Commit e496d0ea authored by Jon Lech Johansen's avatar Jon Lech Johansen

* ./modules/gui/macosx/aout.m: Added mono classification. Fixed channels

                                 issue in InitDevice. Should close #490.
parent ae1b0c7f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout.m: CoreAudio output plugin * aout.m: CoreAudio output plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: aout.m,v 1.25 2003/03/14 00:06:02 massiot Exp $ * $Id: aout.m,v 1.26 2003/03/14 01:08:38 jlj Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -54,10 +54,7 @@ ...@@ -54,10 +54,7 @@
enum AudioDeviceClass enum AudioDeviceClass
{ {
AudioDeviceClassA52 = 1 << 0, AudioDeviceClassA52 = 1 << 0,
AudioDeviceClassPCM2 = 1 << 1, AudioDeviceClassPCM = 1 << 1
AudioDeviceClassPCM4 = 1 << 2,
AudioDeviceClassPCM6 = 1 << 3,
AudioDeviceClassPCM8 = 1 << 4
}; };
static struct aout_class_t static struct aout_class_t
...@@ -83,31 +80,38 @@ aout_classes[] = ...@@ -83,31 +80,38 @@ aout_classes[] =
"Digital A/52" "Digital A/52"
}, },
{
kAudioFormatLinearPCM,
1,
AudioDeviceClassPCM,
"Mono PCM"
},
{ {
kAudioFormatLinearPCM, kAudioFormatLinearPCM,
2, 2,
AudioDeviceClassPCM2, AudioDeviceClassPCM,
"Stereo PCM" "Stereo PCM"
}, },
{ {
kAudioFormatLinearPCM, kAudioFormatLinearPCM,
4, 4,
AudioDeviceClassPCM4, AudioDeviceClassPCM,
"4 Channel PCM" "4 Channel PCM"
}, },
{ {
kAudioFormatLinearPCM, kAudioFormatLinearPCM,
6, 6,
AudioDeviceClassPCM6, AudioDeviceClassPCM,
"6 Channel PCM" "6 Channel PCM"
}, },
{ {
kAudioFormatLinearPCM, kAudioFormatLinearPCM,
8, 8,
AudioDeviceClassPCM8, AudioDeviceClassPCM,
"8 Channel PCM" "8 Channel PCM"
} }
}; };
...@@ -1129,6 +1133,8 @@ static int InitDevice( aout_instance_t * p_aout ) ...@@ -1129,6 +1133,8 @@ static int InitDevice( aout_instance_t * p_aout )
{ {
if( P_STREAMS[i].mFormatID == if( P_STREAMS[i].mFormatID ==
aout_classes[p_option->i_cdx].mFormatID && aout_classes[p_option->i_cdx].mFormatID &&
P_STREAMS[i].mChannelsPerFrame ==
aout_classes[p_option->i_cdx].mChannelsPerFrame &&
P_STREAMS[i].mSampleRate == p_aout->output.output.i_rate ) P_STREAMS[i].mSampleRate == p_aout->output.output.i_rate )
{ {
b_found = VLC_TRUE; b_found = VLC_TRUE;
......
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