0
0

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:

[code:23xcd8cv]
Stream := FSOUND_Stream_Open( PChar( Drive + ‘:*!’ ) , 0 , 0 , 0 );

Count := FSOUND_Stream_GetNumSubStreams( Stream );

if Count <= 0 then
begin
FSOUND_Stream_Close( Stream );
Exit;
end;
[/code:23xcd8cv]

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.

  • You must to post comments
0
0

I just tried it with the 6/15 version of 3.73 and get the same results.

  • You must to post comments
0
0

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?

Cheers,

  • You must to post comments
0
0

Brett,

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.

  • You must to post comments
0
0

There’s a new version available here:

[url:18n2lg34]http://www.fmod.org/files/fmodapi373win.zip[/url:18n2lg34]

…that fixes a problem with an errant filehandle. Let me know how it goes.

Thanks pablo.

  • You must to post comments
0
0

Andrew – yes! that did the trick. Many thanks!

And, apologies for addressing you as “Brett” in my previous reply, I didn’t look at the post information closely enough.

Pablo

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.