I have some music that is split up over a couple of separete .ogg files that can form complete music when linked together. Is it some how possible to merge these files together with FMOD on the fly? I’ve tried to play back the files as streams, but its seems impossible to start the next stream without any hickups (I use a callback function to detect when a stream ends). I’m reaching a dead-end here so I’m open to any suggestions.
What you can do is do your own streaming code :
Create some buffers for each stream (so 2 buffers for 2 streams).
Create a stream callback that will fill the buffers, and that will set the stream paused when the buffers are almost full.
Create a custom stream, and pass it data from the buffer from the first stream, until the end of the song.
Then you can immediately pass it the data from the other song.
Also make sure that this callback unpauses the song if the buffer is about to be empty.
I am working on a similar system to get some effects to work easier, but it’s not finished yet.
I also haven’t tested yet/don’t know what fmod passes to the callback when the stream has ended (will it pass less samples at the end, or will the number of samples that are passes always be the same, even at the end?)
- Adion answered 15 years ago
Please login first to submit.