aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-12-03 04:43:38 -0800
committerChris Robinson <[email protected]>2009-12-03 04:43:38 -0800
commit311cc5c62f4e578a3a845bd04933c097ee1b8e56 (patch)
tree9dc8dd2c3a7cf27101642d8401a6a7a92c971c80 /Alc/pulseaudio.c
parent4a928ea9fab189b97f0d9906c0959a3ab0423ba4 (diff)
Don't wait to accept stream connections
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 84df3832..5bbdb6b6 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -246,7 +246,7 @@ static void stream_state_callback(pa_stream *stream, void *pdata) //{{{
if(state == PA_STREAM_READY || !PA_STREAM_IS_GOOD(state))
{
if(ppa_threaded_mainloop_in_thread(data->loop))
- ppa_threaded_mainloop_signal(data->loop, 1);
+ ppa_threaded_mainloop_signal(data->loop, 0);
}
}//}}}
@@ -531,7 +531,6 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{
}
ppa_stream_set_state_callback(data->stream, stream_state_callback, device);
- ppa_stream_set_write_callback(data->stream, stream_write_callback, device);
if(ppa_stream_connect_playback(data->stream, NULL, &data->attr, PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0)
{
@@ -555,19 +554,20 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{
ppa_stream_unref(data->stream);
data->stream = NULL;
- ppa_threaded_mainloop_accept(data->loop);
ppa_threaded_mainloop_unlock(data->loop);
return ALC_FALSE;
}
ppa_threaded_mainloop_wait(data->loop);
}
- ppa_threaded_mainloop_accept(data->loop);
ppa_stream_set_state_callback(data->stream, stream_state_callback2, device);
stream_buffer_attr_callback(data->stream, device);
ppa_stream_set_buffer_attr_callback(data->stream, stream_buffer_attr_callback, device);
+ stream_write_callback(data->stream, data->attr.tlength, device);
+ ppa_stream_set_write_callback(data->stream, stream_write_callback, device);
+
ppa_threaded_mainloop_unlock(data->loop);
return ALC_TRUE;
} //}}}
@@ -700,7 +700,6 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na
ppa_stream_unref(data->stream);
data->stream = NULL;
- ppa_threaded_mainloop_accept(data->loop);
ppa_threaded_mainloop_unlock(data->loop);
pulse_close(device);
@@ -710,7 +709,6 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na
ppa_threaded_mainloop_wait(data->loop);
}
- ppa_threaded_mainloop_accept(data->loop);
ppa_stream_set_state_callback(data->stream, stream_state_callback2, device);
ppa_threaded_mainloop_unlock(data->loop);