Commit 5bb67a86 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

fix non working optical audio out on mac os lion

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 56a89678
......@@ -631,12 +631,15 @@ static int OpenSPDIF( aout_instance_t * p_aout )
}
/* Set mixable to false if we are allowed to */
AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
if( AudioObjectHasProperty( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress ) )
{
err = AudioObjectIsPropertySettable( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable );
err = AudioObjectGetPropertyDataSize( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size );
err = AudioObjectGetPropertyData( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size, &b_mix );
if( !err && b_writeable )
if( err == noErr && b_writeable )
{
b_mix = 0;
err = AudioObjectSetPropertyData( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, i_param_size, &b_mix );
......@@ -648,6 +651,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
msg_Err( p_aout, "failed to set mixmode: [%4.4s]", (char *)&err );
return false;
}
}
/* Get a list of all the streams on this device */
AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
......@@ -1171,7 +1175,7 @@ static int AudioStreamChangeFormat( aout_instance_t *p_aout, AudioStreamID i_str
OSStatus err = noErr;
UInt32 i_param_size = 0;
AudioObjectPropertyAddress physicalFormatAddress = { kAudioStreamPropertyPhysicalFormat, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
AudioObjectPropertyAddress physicalFormatAddress = { kAudioStreamPropertyPhysicalFormat, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
struct { vlc_mutex_t lock; vlc_cond_t cond; } w;
......
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