summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/pulseaudio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 8c71acd1..c8352b6b 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -305,8 +305,10 @@ static void stream_buffer_attr_callback(pa_stream *stream, void *pdata) //{{{
SuspendContext(NULL);
data->attr = *(ppa_stream_get_buffer_attr(stream));
- Device->UpdateSize = data->attr.tlength/data->frame_size;
- Device->NumUpdates = 1;
+ Device->UpdateSize = 20 * Device->Frequency / 1000;
+ Device->NumUpdates = data->attr.tlength/data->frame_size / Device->UpdateSize;
+ if(Device->NumUpdates == 0)
+ Device->NumUpdates = 1;
ProcessContext(NULL);
}//}}}