Commit eefef369 authored by Serge Ziryukin's avatar Serge Ziryukin Committed by Max Kellermann

output/openal: fix default device name

parent 4ebf53ff
...@@ -123,13 +123,13 @@ openal_init(G_GNUC_UNUSED const struct audio_format *audio_format, ...@@ -123,13 +123,13 @@ openal_init(G_GNUC_UNUSED const struct audio_format *audio_format,
const char *device_name = config_get_block_string(param, "device", NULL); const char *device_name = config_get_block_string(param, "device", NULL);
struct openal_data *od; struct openal_data *od;
od = g_new(struct openal_data, 1);
od->device_name = device_name;
if (device_name == NULL) { if (device_name == NULL) {
device_name = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); device_name = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
} }
od = g_new(struct openal_data, 1);
od->device_name = device_name;
return od; return od;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment