From 77a0a6de9542296b9c7776041e9fb3c512b8fffc Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 26 Dec 2009 11:30:41 -0800 Subject: Wait for the buffer attrib update from pulse to finish --- Alc/pulseaudio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Alc') 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; -- cgit v1.2.3