This is on Windows 2000 SP4 with 2 DVD drives, one from Sony another from Pioneer using fmod 3.73
I am using fmod to detect whether an inserted disc is an audio disc. To do this, I open the stream and count the number of sub-streams. If there are no sub-streams, it is deemed to not be an audio CD and the stream is closed.
The problem I have is that after this code executes, there seems to be some state that is not cleaned up, because other parts of the application have problems accessing that drive. In a case where a DVD is inserted, the detection code described above is executed and then another part of the application tries to play the DVD, and there are lock-ups, or just general problems playing the DVD…these problems go away if I comment out the audio CD detection code. All on the same machine with the same two drives and any DVD disc.
Furthermore, if I use ASPI (by passing ‘a’ to the stream open call, everything works fine).
Here is the code:
Stream := FSOUND_Stream_Open( PChar( Drive + ‘:*!’ ) , 0 , 0 , 0 );
Count := FSOUND_Stream_GetNumSubStreams( Stream );
if Count <= 0 then
FSOUND_Stream_Close( Stream );
I’ve also tried the ‘j’ option with the same results.
So, I am wondering if there is something with the native NTSCSI support that leaves the drive in a “bad” state.
- pablop asked 14 years ago
Yes, when it comes time to play an audio CD, it is re-opened, but that part of the code is not executing in this case.
In this case, the disc is a DVD, so my program goes on to use DirectShow to play the DVD. I would love to give you a repro case, but that would be very difficult.
I can, however, give you access to the whole application so that you can see what is happening…if you are interested.
In cases of a DVD, playback doesn’t work correctly and DVD audio is very choppy. Changing it to use ASPI, or removing the offending code gets the DVD to play smoothly.
My application is plugin-based, and one of our users created a plugin that uses BASS to rip CD’s. He was encountering this problem also. After the fmod detection code executed, his plugin was unable to access the CD using BASS.
Are you re-opening the stream without the “!” quick open option when you detect that there are audio tracks? When a stream is quick opened it is not in a playable state so you must always close it and reopen it without quick open before playing.
Also, how are you accessing the drive in the other parts of your program? Can you give me a small repro case that demonstrates the problem?
Please login first to submit.