LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I play CD audio tracks using LabVIEW?

I need to be able to play and stop tracks from CD's. Is it possible. I know it's easy to play wav's but I need to play the source.
0 Kudos
Message 1 of 6
(3,786 Views)
Hi,
if you know how to use system DLLs from LabVIEW then you may try to use MCI commands located in windows/system32/winmm.dll. These command allow you to control multimedia devices in your PC.
The example of how to play CD tracks is located at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/mci_6lrg.asp
Also you can read there another info about MCI.

If I find time today I will send you an example.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 6
(3,786 Views)
Thanks Oleg

I've had a go at using the system DLL's but am not familiar with how to use them so I'm having some trouble. If anybody could send me an example I'd be grateful.

Coxy
0 Kudos
Message 3 of 6
(3,786 Views)
Hi,
I've made an example for you based on MCI command
mciSendStringA from winmm.dll
This example plays the specified track from CD.
The idea is in sequential sending of the next strings to driver:

"open cdaudio wait"
"set cdaudio time format tmsf wait"
"play cdaudio from T1 to T2"
"stop cdaudio wait"
"close cdaudio wait"

The example is attached and works fine on my PC.

Good luck.

Oleg Chutko.
Message 4 of 6
(3,785 Views)
Good job indeed!

Alberto
0 Kudos
Message 5 of 6
(3,785 Views)
Hi Oleg,

Thanks for that. It works great!

Coxy
0 Kudos
Message 6 of 6
(3,785 Views)