LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make Sound Player.vi play wave file on sound card other than the Windows default?

I was using Sound Player.vi which I found from LabVIEW 8.0 examples. When I tried to play a wave file on my second sound card (Xtreme Sound 7.1 from Diamond) by changing the Device ID from 0 to 1, nothing came out of my second sound card, even though Sound Player.vi would indicate "playing". The vi seemed to work only when Device ID was set to 0, which was supposedly my Windows default sound card (Soundblaster Live 24bit from Creative Labs). How do I make Sound Player.vi play wave file on a sound card other than the Windows default?
0 Kudos
Message 1 of 5
(3,401 Views)
Hi mta,

What happens when you make the Xtreme Sound 7.1 from Diamond your Windows default card?  Check to make sure you have DirectX 8.0 or later.  This is very peculiar behavior. 

Ecleamus Ricks, Jr.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(3,379 Views)
Hi Ecleamus,
 
Thanks for your reply. I did make my Xtreme Sound 7.1 as Windows default. When I did, the sound then came out of the new default sound card. In fact, I was working with one of your Support engineers (Ken or Kent) But what really wanted to accomplish was to make Sound Player.vi play wave file on the second sound card by changing the Device ID to 1, which didn't seem to work. Do you have any suggestions? By the way, I noticed there was a message in the forum from Juan Carlos (NI) saying that there was a work-around using Snd Write Waveform VI. If you search by typing "multiple sound cards", you can see it.
 
Mike Wu
LACMTA
0 Kudos
Message 3 of 5
(3,364 Views)
There is a bug in the C call that the play sound file vi uses.  Here is an alternative vi that works as expected.  We are working on a fix for the bug.


Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 4 of 5
(3,327 Views)
Hi Kenn,
 
Thanks for the reply & the new vi file. I'll give it a try.
 
Mike
LACMTA
0 Kudos
Message 5 of 5
(3,312 Views)