aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-03-01 01:19:07 -0800
committerChris Robinson <[email protected]>2012-03-01 01:19:07 -0800
commit54f906b347af48571bf1322053c06379ec30fe93 (patch)
tree0af7f4dbd065a62c799416a6b5588f0514e6ae9e
parent4b252bc49431306f476acae1f64589e6ed187559 (diff)
Don't check if the pulseaudio sink is suspended when opening
-rw-r--r--Alc/backends/pulseaudio.c36
1 files changed, 1 insertions, 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) //{{{