PDA

View Full Version : Playing .cda from a folder



Bruce
03-01-2004, 09:48 AM
Trying to play a .cda file from a folder on the CD. I used this code from the CD player but I'm sure I'm missing something.


--Load the CD
CDAudio.LoadCD("\\Autoplay\\Music\\1");

--get number of tracks on cd, playmode, and volume
nNumberOfTracks = CDAudio.GetNumTracks(sCDDrive);
nPlayMode = CDAudio.GetPlayMode(sCDDrive);
--the above values are displayed to the user in the Page Timer event

--start the page timer
Page.StartTimer(500);

--play the cd
CDAudio.Play();

--enable every button, because a CD is now playing.
Button.SetEnabled("Prev Track");
Button.SetEnabled("Next Track");
Button.SetEnabled("Stop");
Button.SetEnabled("Pause");
Button.SetEnabled("Seek Rev");
Button.SetEnabled("Seek Fwd");

Bruce
03-02-2004, 09:12 AM
Is this even possable?.... Anyone?

Lorne
03-03-2004, 10:59 AM
That isn't going to work. A .cda file isn't an actual CD audio track...it's a just a data file containing a ripped CD audio track. The data is the same either way, but it's in a completely different place.

It's akin to pouring yourself a glass of milk from the fridge as opposed to getting it straight from the cow. You could say that CD Audio knows cows, but doesn't have the slightest idea what to do with a fridge.

You should be burning those .cda files as actual audio tracks, and then using the plugin to play those tracks. If you store the .cda files in a folder, your users won't be able to play them in a regular CD player.

I think Windows Media Player might be able to play .cda files, if you really need to play .cda files in a folder you could use the Media Player plugin to do it, but you're using a lot of space on the CD for nothing if you do it that way. If you need your audio files stored in a folder instead of writing them out as tracks on the CD, I would encode them as high-quality ogg files.

Bruce
03-03-2004, 01:25 PM
Thx Lorne.
Yeah the customer wants 4gigs of .cda sound bite files converted to MP3 now with an interface. :huh (DVD)