Commit ece19198 authored by Felix Paul Kühne's avatar Felix Paul Kühne

auhal: pretend to support audio device switching for demo purposes

parent 514843b2
...@@ -909,9 +909,12 @@ static int DeviceList(audio_output_t *p_aout, char ***namesp, char ***descsp) ...@@ -909,9 +909,12 @@ static int DeviceList(audio_output_t *p_aout, char ***namesp, char ***descsp)
*namesp = names = xmalloc(sizeof(*names) * n); *namesp = names = xmalloc(sizeof(*names) * n);
*descsp = descs = xmalloc(sizeof(*descs) * n); *descsp = descs = xmalloc(sizeof(*descs) * n);
char deviceid[100];
for (struct audio_device_t *device = p_sys->devices; device != NULL; device = device->next) { for (struct audio_device_t *device = p_sys->devices; device != NULL; device = device->next) {
*(names++) = strdup(device->name); sprintf(deviceid, "%i", device->deviceid);
sprintf(*(descs++), "%d", device->deviceid); *(names++) = strdup(deviceid);
msg_Dbg(p_aout, "using device id %s", deviceid);
*(descs++) = strdup(device->name);
} }
msg_Dbg(p_aout, "returning a list of %i devices", n); msg_Dbg(p_aout, "returning a list of %i devices", n);
...@@ -1040,6 +1043,8 @@ static int SwitchAudioDevice(audio_output_t *p_aout, const char *name) ...@@ -1040,6 +1043,8 @@ static int SwitchAudioDevice(audio_output_t *p_aout, const char *name)
{ {
msg_Warn(p_aout, "we should switch to device '%s'", name); msg_Warn(p_aout, "we should switch to device '%s'", name);
aout_DeviceReport(p_aout, name);
return 0; return 0;
} }
......
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