tags:

views:

129

answers:

2

Hi

I asked this previously but Jeff Atwood moved my question to superuser.com. I need a answer programatically...

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 sample "USBSimple Example" downloaded from apple's site didn't worked!

Any help would be appreciated!

Thanks

A: 

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.

Azeem.Butt
Thanks NSD, can you suggest any third party product for this... i tried portaudio but didn't get this to work...
Saurabh
+1  A: 

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 prticular device

Please find here how can you get audio device uid

Saurabh