0
0

I’ve tried a lot, but somehow FSOUND_Stream_GetOpenState() keeps returning -2 😥

I have a structure which keeps track of several things
[code:13e7ry6c]typedef struct {
char *FileName;
FSOUND_STREAM *Stream;
TFMODPlayer *Owner;
TFileState FileState;
int Index;
int Frequency;
int Duration;
int Channel;
} FMOD_File;[/code:13e7ry6c]

Now when i open a file the following is done inside the class
[code:13e7ry6c]
if (File->Owner->Speakers != STEREO) {
flags = FSOUND_16BITS | FSOUND_SIGNED | FSOUND_FORCEMONO;
}
if (File->Owner->AccurateTime) flags |= FSOUND_MPEGACCURATE;
if (File->Owner->HW2D) flags |= FSOUND_HW2D;
else flags |= FSOUND_2D;
if (!File->Owner->BlockAtOpening) flags |= FSOUND_NONBLOCKING;
File->Stream = File->Owner->FMOD->FSOUND_Stream_Open(filename, flags, 0, 0);
[/code:13e7ry6c]

Then a multimedia timer checks the stream if it is loaded
[code:13e7ry6c]
if (File->FileState == OPENING) { // get opening info
switch (File->Owner->FMOD->FSOUND_Stream_GetOpenState(File->Stream))
{[/code:13e7ry6c]

But somehow it keeps returning -2 (stream is still opening)
However when i load the file without FSOUND_NONBLOCKING it works as expected.

This happens in all output modes

  • You must to post comments
0
0

Complete source is the same as i posted [url=http://www.fmod.org/forum/viewtopic.php?p=16621#16621:22ud2g5f]here[/url:22ud2g5f]

  • You must to post comments
0
0

It’s a local file.
In 3.6x you could use nonblocking and poll if the file is opened.

The documentation doesn’t say it’s URL only.

The download link is not dead but probably protected.
Copy/paste the link should work.

  • You must to post comments
0
0

Is someone looking into this ?

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.