Jump to content
  • Advertisement
Sign in to follow this  

[FMOD] problem using playSound() with large files.

This topic is 3748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I cannot seem to properly create sound objects for large sound files (>9Mb). I load the sound files using FMOD::System::createSound() and then try to play the sound using FMOD::System::playSound(). Now, I realize that it is probably more appropriate to stream these large files, but I didn't notice anything in the documentation that placed a restriction on file size. The actual signature of playSound() is,
FMOD_RESULT F_API playSound(FMOD_CHANNELINDEX channelid, Sound *sound, bool paused, Channel **channel);

'channel' is an optional variable that can normally be set to NULL if you are not interested in obtaining the channel. It seems fine to use NULL for small files sizes, but not for the large files, where FMOD ends up trying to dereference a null pointer. Placing a dummy Channel variable avoids this problem, but it seems odd to have to do it. While using a dummy Channel avoids the crash, no sound is actually played. Does anyone know what I'm doing wrong here? I've search the FMOD forums but I haven't found any solutions. I also haven't seen any mention of this in the docs. I'm going to try reading the docs more thoroughly, but I was wondering if anyone can help? Cheers!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!