Basic Info:
Programming Language - C++
Platform - Windows
Audio Formats - wav and mid
I recently finished a game and was fooling around with figuring out the best way to upload it to a file hosting site. I eventually decided on using 7zip's self-extracting feature. However, I think the mistake I made was that instead of just copying what I needed to another folder and zipping that up for the distribution (i.e., not copying source files, etc.) I rearranged the actual folder that held all of my source files etc. and split it into 2 sub folders for the C++ files, and then everything else (that folder being the one that got zipped up.)
I tested downloading it and playing it and it worked fine. However, I went back because I decided to change the background music and that's when the problem started happening.
To sum the problem up, Mix_PlayMusic()
is being called and is working correctly. However, for some reason no sound is playing (and neither are any of the sound effects called from Mix_PlayChannel()
). The odd thing is that you can hear the music when Mix_FadeOutMusic()
is called. I also have a sound toggling feature, but after thorough testing I've come to the conclusion that it isn't the problem.
I finally decided to create a completely new project and just bring all of the files I needed into that project in the same "organization" that they were in originally. However, the problem is still there.
I have no idea what's wrong. The files are being loaded in fine, it's just that when the music is supposed to be playing (and according to testing it is), it's not playing. This also applies to sound effects.
Edit: I actually wrote a test for each game loop for whether the music is playing and apparently the music is playing. It's just that for some reason it isn't being heard.