Commit 4961a874 authored by Christophe Massiot's avatar Christophe Massiot

Partial fix of the OS X audio output (thanks Heiko!).

parent 1c1a74e5
......@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: a52tofloat32.c,v 1.6 2002/11/14 22:38:46 massiot Exp $
* $Id: a52tofloat32.c,v 1.7 2002/11/18 23:00:41 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -289,8 +289,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_samples = a52_samples( p_sys->p_liba52 );
if ( ((p_sys->i_flags & A52_CHANNEL1) || (p_sys->i_flags & A52_CHANNEL2)
|| (p_sys->i_flags & A52_MONO))
if ( ((p_sys->i_flags & A52_CHANNEL_MASK) == A52_CHANNEL1
|| (p_sys->i_flags & A52_CHANNEL_MASK) == A52_CHANNEL2
|| (p_sys->i_flags & A52_CHANNEL_MASK) == A52_MONO)
&& (p_filter->output.i_physical_channels
& (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT)) )
{
......
......@@ -2,7 +2,7 @@
* aout.m: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout.m,v 1.14 2002/11/14 22:38:48 massiot Exp $
* $Id: aout.m,v 1.15 2002/11/18 23:00:41 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -129,9 +129,13 @@ int E_(OpenAudio)( vlc_object_t * p_this )
case kAudioFormatLinearPCM:
p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2');
if ( p_sys->stream_format.mChannelsPerFrame < 6 )
p_aout->output.output.i_channels = AOUT_CHAN_STEREO;
p_aout->output.output.i_physical_channels
= AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
else
p_aout->output.output.i_channels = AOUT_CHAN_3F2R | AOUT_CHAN_LFE;
p_aout->output.output.i_physical_channels
= AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT
| AOUT_CHAN_CENTER | AOUT_CHAN_REARRIGHT
| AOUT_CHAN_REARLEFT | AOUT_CHAN_LFE;
break;
case kAudioFormat60958AC3:
......@@ -257,7 +261,12 @@ static OSStatus IOCallback( AudioDeviceID inDevice,
outOutputData->mBuffers[ 0 ].mData,
p_sys->i_buffer_size );
// msg_Dbg(p_aout, "This buffer has %d bytes, i take %d", p_buffer->i_nb_bytes, p_sys->i_buffer_size);
/* msg_Dbg(p_aout, "This buffer has %d bytes, i take %d: %f %f %f %f",
p_buffer->i_nb_bytes, p_sys->i_buffer_size,
((float*)p_buffer->p_buffer)[0], ((float*)p_buffer->p_buffer)[1],
((float*)p_buffer->p_buffer)[2], ((float*)p_buffer->p_buffer)[3]);
*/
aout_BufferFree( p_buffer );
}
......
......@@ -2,7 +2,7 @@
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: vout.m,v 1.3 2002/10/04 14:02:20 sam Exp $
* $Id: vout.m,v 1.4 2002/11/18 23:00:41 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -139,6 +139,7 @@ int E_(OpenVideo) ( vlc_object_t *p_this )
msg_Err( p_vout, "EnterMovies failed: %d", err );
free( p_vout->p_sys->p_matrix );
DisposeHandle( (Handle)p_vout->p_sys->h_img_descr );
vlc_object_release( p_vout->p_sys->p_intf );
free( p_vout->p_sys );
return( 1 );
}
......@@ -167,6 +168,7 @@ int E_(OpenVideo) ( vlc_object_t *p_this )
{
free( p_vout->p_sys->p_matrix );
DisposeHandle( (Handle)p_vout->p_sys->h_img_descr );
vlc_object_release( p_vout->p_sys->p_intf );
free( p_vout->p_sys );
return( 1 );
}
......@@ -176,6 +178,7 @@ int E_(OpenVideo) ( vlc_object_t *p_this )
msg_Err( p_vout, "unable to create window" );
free( p_vout->p_sys->p_matrix );
DisposeHandle( (Handle)p_vout->p_sys->h_img_descr );
vlc_object_release( p_vout->p_sys->p_intf );
free( p_vout->p_sys );
return( 1 );
}
......
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