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

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

## 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!