Archived

This topic is now archived and is closed to further replies.

Moho

Clip stitching

Recommended Posts

Moho    122
I''m trying to come up with a scheme for my games'' background music. In order to reduce download size, I''d like to take a few short clips (probably ogg files) of about 10 seconds each, then piece them together in random order to make a few minutes of music. I would also like to be able seamlessly switch to a different set of clips to change the mood of the music to match the gameplay. The problem is: how to stich the clips together on the fly? I have done some initial testing with fmod and it seems a bit complex to implement. Does anybody have any suggestions how to do this, possibly with another API?

Share this post


Link to post
Share on other sites
krikkit    792
I suspect it would be fine to take the task of creating the buffer-to-be-played yourself, and thus add in your files'' data sequentially, and just have your API play the buffer as it goes.

Share this post


Link to post
Share on other sites
geo_elementum    138
i don''t think i can help you with specifics, but baldurs gate used something like this. there are file folders with dozens of 3 and 6 second clips - interchangeable ones, and different moods, all to create different, relatively random music, and the ability to, every few seconds, gradually change from bkg music to fight music.


-geo-
http://www.geocities.com/elementum_game

Share this post


Link to post
Share on other sites
Kylotan    10013
Hmm... outside suggestion...

Perhaps you could use the OGG files as samples in a very trivial module file that supports them - if one exists! One sample per pattern. Then you can perhaps use the FMUSIC_SetOrder function to jump between them. I expect this function is optimised to be seamless. But I''ve never used FMOD so I don''t know if this is viable or not.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites