5 // Created by Heiko Panther on Tue Sep 10 2002.
6 // Copyright (c) 2002 __MyCompanyName__. All rights reserved.
9 #import <Foundation/Foundation.h>
10 #import <CoreAudio/CoreAudio.h>
11 #import "adev_discovery.h"
14 /*****************************************************************************
16 * Each audio device can give several sound options: there might be several
17 * streams on one device, each can have different formats which might qualify
19 * We record format and channels, since these attributes are requirements
20 * from the user and the aout should deliver what the user wants. This
21 * selection is basically done when the user chooses the output option.
22 * We do not record sample rate and bit depth, since these attributes are
23 * tied to the media source, and the device format that matches these media
24 * formats best should be selected. This selection is done when the aout
25 * module is created with a certain stream, and asks the asystm for a device.
26 *****************************************************************************/
27 @interface MacOSXSoundOption:NSObject
30 AudioDeviceID deviceID;
35 - (id)initWithName:(NSString*)_name deviceID:(AudioDeviceID)devID streamIndex:(UInt32)strInd formatID:(UInt32)formID chans:(UInt32)chans;
36 - (AudioDeviceID)deviceID;
37 - (UInt32)streamIndex;
45 @interface MacOSXAudioSystem : NSObject {
47 /* selected output device */
48 NSMenuItem *selectedOutput;
51 - (id)initWithGUI:(VLCMain*)main;
52 - (AudioStreamID) getStreamIDForIndex:(UInt32)streamIndex device:(AudioDeviceID)deviceID;
53 - (void)CheckDevice:(AudioDeviceID)deviceID isInput:(bool)isInput;
54 - (void)registerSoundOption:(MacOSXSoundOption*)option;
55 - (void)selectAction:(id)sender;
56 - (AudioStreamID)getSelectedDeviceSetToRate:(int)preferredSampleRate;