How to use usb speaker and built in audio speakers simultaneously on MAC OS X 10.6 using cocoa or anything else?
I asked this previously but Jeff Atwood moved my question to superuser.com. I need a answer programmatically...
I want to use built in speakers and usb speakers simultaneously on MAC OS X 10.6.
I want to play different files on these (I do not want to play same file on both speakers).
Is it possible using cocoa (QTMovie or something else?) or anything else?
I have checked the portaudio thing but didn't get how this works! :(
I have also tried to send some data to the USB speakers but the s开发者_开发知识库ample "USBSimple Example" downloaded from apple's site didn't worked!
ok I got it myself...
NSSound *airplaneSound = [NSSound soundNamed:@"Aura Cleanse-1.wav"];
[airplaneSound setPlaybackDeviceIdentifier:theCFString];
[airplaneSound play];
I can pass the audio device uid in the setPlaybackDeviceIdentifier to play this sound on a particular device
Please find here how can you get audio device uid
Cocoa has nothing to do with audio hardware management. If the features you need aren't in "Audio/MIDI Setup" and you don't understand the CoreAudio documentation, then there really aren't any other options for you beyond searching for a third-party product.
精彩评论