Commit 2a07b546 authored by David Fuhrmann's avatar David Fuhrmann

macosx: add missing vlc_object_release and stuff for audio device selection

parent a446ef28
......@@ -766,17 +766,20 @@ static VLCMainMenu *_o_sharedInstance = nil;
- (IBAction)toggleAudioDevice:(id)sender
{
audio_output_t * p_aout = getAout();
if (!p_aout)
return;
int returnValue = 0;
if ([sender tag] > 0)
aout_DeviceSet(p_aout, [[NSString stringWithFormat:@"%li", [sender tag]] UTF8String]);
returnValue = aout_DeviceSet(p_aout, [[NSString stringWithFormat:@"%li", [sender tag]] UTF8String]);
else
aout_DeviceSet(p_aout, NULL);
returnValue = aout_DeviceSet(p_aout, NULL);
if (returnValue != 0)
msg_Warn(VLCIntf, "failed to set audio device %li", [sender tag]);
vlc_object_release(p_aout);
[self refreshAudioDeviceList];
}
......
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