#include <vlc_common.h>
#include <vlc_plugin.h>
-#include <vlc_interface.h>
+#include <vlc_dialog.h>
#include <vlc_aout.h>
+// By pass part of header which compile with some warnings,
+// and that we don't require.
+#define __MACHINEEXCEPTIONS__
+
#include <CoreAudio/CoreAudio.h>
#include <AudioUnit/AudioUnitProperties.h>
#include <AudioUnit/AudioUnitParameters.h>
if( p_sys->i_hog_pid != -1 && p_sys->i_hog_pid != getpid() )
{
msg_Err( p_aout, "Selected audio device is exclusively in use by another program." );
- intf_UserFatal( p_aout, false, _("Audio output failed"),
+ dialog_Fatal( p_aout, _("Audio output failed"), "%s",
_("The selected audio output device is exclusively in "
"use by another program.") );
goto error;
{
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
msg_Err( p_aout, "You should configure your speaker layout with Audio Midi Setup Utility in /Applications/Utilities. Now using Stereo mode." );
- intf_UserFatal( p_aout, false, _("Audio device is not configured"),
+ dialog_Fatal( p_aout, _("Audio device is not configured"), "%s",
_("You should configure your speaker layout with "
"the \"Audio Midi Setup\" utility in /Applications/"
"Utilities. Stereo mode is being used now.") );
DeviceFormat.mFormatID = kAudioFormatLinearPCM;
/* We use float 32. It's the best supported format by both VLC and Coreaudio */
- p_aout->output.output.i_format = VLC_FOURCC( 'f','l','3','2');
+ p_aout->output.output.i_format = VLC_CODEC_FL32;
DeviceFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
DeviceFormat.mBitsPerChannel = 32;
DeviceFormat.mChannelsPerFrame = aout_FormatNbChannels( &p_aout->output.output );
/* Set the format flags */
if( p_sys->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian )
- p_aout->output.output.i_format = VLC_FOURCC('s','p','d','b');
+ p_aout->output.output.i_format = VLC_CODEC_SPDIFB;
else
- p_aout->output.output.i_format = VLC_FOURCC('s','p','d','i');
+ p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
p_aout->output.output.i_frame_length = A52_FRAME_NB;
p_aout->output.i_nb_samples = p_aout->output.output.i_frame_length;
*****************************************************************************/
static void Play( aout_instance_t * p_aout )
{
+ VLC_UNUSED(p_aout);
}
if( !AudioDeviceHasOutput( p_devices[i]) )
{
msg_Dbg( p_aout, "this device is INPUT only. skipping..." );
+ free( psz_name );
continue;
}
return;
error:
- var_Destroy( p_aout, "audio-device" );
+ msg_Warn( p_aout, "audio device already in use" );
free( p_devices );
return;
}
static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
- unsigned int inBusNummer,
+ unsigned int inBusNumber,
unsigned int inNumberFrames,
AudioBufferList *ioData )
{
aout_instance_t * p_aout = (aout_instance_t *)_p_aout;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
+ VLC_UNUSED(ioActionFlags);
+ VLC_UNUSED(inBusNumber);
+ VLC_UNUSED(inNumberFrames);
+
host_time.mFlags = kAudioTimeStampHostTimeValid;
AudioDeviceTranslateTime( p_sys->i_selected_dev, inTimeStamp, &host_time );
aout_instance_t * p_aout = (aout_instance_t *)threadGlobals;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
+ VLC_UNUSED(inDevice);
+ VLC_UNUSED(inInputData);
+ VLC_UNUSED(inInputTime);
+
/* Check for the difference between the Device clock and mdate */
p_sys->clock_diff = - (mtime_t)
AudioConvertHostTimeToNanos( inNow->mHostTime ) / 1000;
{
/* something changed in the list of devices */
/* We trigger the audio-device's aout_ChannelsRestart callback */
- var_Change( p_aout, "audio-device", VLC_VAR_TRIGGER_CALLBACKS, NULL, NULL );
+ var_TriggerCallback( p_aout, "audio-device" );
var_Destroy( p_aout, "audio-device" );
}
break;
{
OSStatus err = noErr;
struct { vlc_mutex_t lock; vlc_cond_t cond; } * w = inClientData;
+
+ VLC_UNUSED(inStream);
+ VLC_UNUSED(inChannel);
switch( inPropertyID )
{