aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/pulseaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r--Alc/pulseaudio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 4bce7379..4f39afb5 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -216,9 +216,6 @@ static ALCboolean pulse_open(ALCdevice *device, const ALCchar *device_name) //{{
else
data->context_name = "OpenAL Soft";
- device->ExtraData = data;
- device->szDeviceName = device_name;
-
if(!(data->loop = ppa_threaded_mainloop_new()))
{
AL_PRINT("pa_threaded_mainloop_new() failed!\n");
@@ -275,6 +272,9 @@ static ALCboolean pulse_open(ALCdevice *device, const ALCchar *device_name) //{{
ppa_threaded_mainloop_accept(data->loop);
}
+ device->szDeviceName = strdup(device_name);
+ device->ExtraData = data;
+
ppa_threaded_mainloop_unlock(data->loop);
return ALC_TRUE;