0
0

hi!

i have a problem with fmod: i want to stream mp3s, some of them very small (just a few kb). files whose size is bigger than the buffersize of fmod work without a problem. but files that are smaller do not, unless you append silence to their end to make them bigger. when opening the stream, fmod crashes.

i explain it to myself like this: the program tries to cache 95% of the buffersize value. because the file is to small, the buffer will never be filled. therefore fmod never begins playing.

i tried to use the FSOUND_Stream_GetLength function to find out the filesize and adjust the buffersize accordingly, but this function is only available AFTER the stream has been opened, so I dont even get that far.

any ideas? thanks a lot!

rh

  • You must to post comments
0
0

hi again!

[quote="brett":1myxh57d]Hi there,
i have wav files that are only 1 or 2kb and they play fine with a 1000ms stream buffer (132kb).[/quote:1myxh57d]

hmm i was not totally clear here: the buffer i am refering to ist the one that can be set through FSOUND_Stream_Net_GetBufferProperties, so it is the one specified in bytes AND NOT in msec.

one more thing i was not clear on: fmod does not CRASH, but it will FREEZE.

when i make the buffersize smaller accordingly, then small will files will play as well. and i even have the problem with the official VB example provided in your ZIP file (when i manually replace the CommonDialog1.FileName by a string pointing to the stream on the net).

a minimal example that does reproduce the problem would be:

[code:1myxh57d]Option Explicit
Dim streamhandle As Long

Private Sub Command1_Click()
FSOUND_Init 44100, 32, 0
streamhandle = FSOUND_Stream_Open("http://www.xyz.com/path/filename.mp3", FSOUND_NORMAL, 0, 0)
FSOUND_Stream_Play FSOUND_FREE, streamhandle
End Sub

Private Sub Command2_Click()
FSOUND_Stream_Close streamhandle
streamhandle = 0
FSOUND_Close
End Sub[/code:1myxh57d]

thanks for your help!

rh[/code]

  • You must to post comments
0
0

Fixed. It was a problem with the buffering code. There’ll be a new dll available tomorrow.

Thanks rh.

  • You must to post comments
0
0

[quote="andrew":1qea7lgx]Fixed. It was a problem with the buffering code. There’ll be a new dll available tomorrow.

Thanks rh.[/quote:1qea7lgx]

oh cool, i am looking forward to it. thanks for your help!

regards,

rh

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.