From 54f906b347af48571bf1322053c06379ec30fe93 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 1 Mar 2012 01:19:07 -0800 Subject: Don't check if the pulseaudio sink is suspended when opening --- Alc/backends/pulseaudio.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 2376a584..99c9fd18 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -889,8 +889,6 @@ static void pulse_close(ALCdevice *device) //{{{ static ALCenum pulse_open_playback(ALCdevice *device, const ALCchar *device_name) //{{{ { const char *pulse_name = NULL; - pa_sample_spec spec; - pa_stream *stream; pulse_data *data; if(!allDevNameMap) @@ -921,41 +919,9 @@ static ALCenum pulse_open_playback(ALCdevice *device, const ALCchar *device_name return ALC_INVALID_VALUE; data = device->ExtraData; - - pa_threaded_mainloop_lock(data->loop); - - spec.format = PA_SAMPLE_S16NE; - spec.rate = 44100; - spec.channels = 2; - - stream = connect_playback_stream(pulse_name, data->loop, data->context, 0, - NULL, &spec, NULL); - if(!stream) - { - pa_threaded_mainloop_unlock(data->loop); - goto fail; - } - - if(pa_stream_is_suspended(stream)) - { - ERR("Device is suspended\n"); - pa_stream_disconnect(stream); - pa_stream_unref(stream); - pa_threaded_mainloop_unlock(data->loop); - goto fail; - } - data->device_name = strdup(pa_stream_get_device_name(stream)); - - pa_stream_disconnect(stream); - pa_stream_unref(stream); - - pa_threaded_mainloop_unlock(data->loop); + data->device_name = strdup(pulse_name); return ALC_NO_ERROR; - -fail: - pulse_close(device); - return ALC_INVALID_VALUE; } //}}} static void pulse_close_playback(ALCdevice *device) //{{{ -- cgit v1.2.3