0
0

Whenever I pass my CDROM drive letter to the function it will crash the program. I can give it any other drive letter and it won’t crash. Streaming internet audio and regular mp3s work fine. I can use the actual CD functions and they work fine. My CDROM is a Samsung CDRW/DVD SM 352B.

  • You must to post comments
0
0

The program was crashing because my ASPI layer was messed up. Its now fixed but now I don’t get any audio. Here is my CD playing code:

[code:1fx9iq44]
handle = FSOUND_Stream_Open("e:", 0, 0, 0);

if (handle == NULL)
{
    MessageBox(g_hwnd, "Error reading CD!", "EH MP3", MB_OK);

    return;
}

if (FSOUND_Stream_SetSubStream(handle, 3) == FALSE)
{
    MessageBox(g_hwnd, "Error playing CD!", "EH MP3", MB_OK);

    return;
}

[/code:1fx9iq44]

What will happen is if I press play once I get nothing. But if I press it again I get the error playing CD message. The actual CD functions work fine and I’ll probably just end up using them. I’m just wondering why I have a problem with this.

  • You must to post comments
0
0
  • You must to post comments
0
0

I’ve looked through that thread already, thats how I fixed my ASPI layer. Its strange because Winamp and Media Player play the CDs just fine.

  • You must to post comments
0
0

[quote:2btqw37r]I’ve looked through that thread already, thats how I fixed my ASPI layer. Its strange because Winamp and Media Player play the CDs just fine.[/quote:2btqw37r]

Have you tried the “a” option to FSOUND_Stream_Open to force FMOD to use ASPI? If it’s still not working then download the cddatest program :

http://52.88.2.202/files/cddatest.zip

…run it and email the results to support@fmod.org

Cheers,

  • You must to post comments
0
0

Something I didn’t even notice, and neither did nobody else, is I didn’t actually play the stream. It does work fine but I’ve found another problem. I can start a CD only once a session. Have to restart the program to play a CD again. I’m not even messing with the sub streams at the moment. Just trying to get a CD to play through right now. The only code I’m using is what I had above (but with the play function now) and this bit when the stop button is pressed:

[code:3jg8b444]
FSOUND_Stream_Stop(handle);
[/code:3jg8b444]

I have no problem with starting and stopping the stream with mp3s its just with CDDA. The handle to the streams is a global so I don’t think its a case of a bad handle or anything.

  • You must to post comments
0
0

You can only open one CDDA stream at a time per CD device. It looks like you’re trying to open one each time you want to play it but you’re not closing it (FSOUND_Stream_Close) when you stop playing it.

Either open/play/close each time you play it or call open at the start and then play/stop as many times as you like and then close it at the end.

  • You must to post comments
0
0

Thanks, its fixed that problem.

  • You must to post comments
0
0

Well see I tried your code to play the CD and it works fine, its just when I stop it I cant start it back up, nothing plays… and I’m still kinda new with this so I dont know much.

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.