aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-12-26 11:30:41 -0800
committerChris Robinson <[email protected]>2009-12-26 11:30:41 -0800
commit77a0a6de9542296b9c7776041e9fb3c512b8fffc (patch)
tree72b41f542592a6050dda2d9609228125b524fe33 /Alc/pulseaudio.c
parentc1fd977e799b6037f91688ad6aaddfd1e627fd10 (diff)
Wait for the buffer attrib update from pulse to finish
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 00be70fd..57438bb7 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -615,7 +615,10 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{
data->spec.rate / device->Frequency * data->frame_size;
data->attr.tlength = data->attr.minreq * device->NumUpdates;
- o = ppa_stream_set_buffer_attr(data->stream, &data->attr, NULL, NULL);
+ o = ppa_stream_set_buffer_attr(data->stream, &data->attr,
+ stream_success_callback, device);
+ while(ppa_operation_get_state(o) == PA_OPERATION_RUNNING)
+ ppa_threaded_mainloop_wait(data->loop);
ppa_operation_unref(o);
device->Frequency = data->spec.rate;