Problems with sound

BlitzMax Forums/BlitzMax Programming/Problems with sound

William Drescher(Posted 2009) [#1]
Ok, I don't know what I'm doing wrong here. I allocate the channel, I [try to] load the sound file, and then when I use "PlaySound" I get a null reference error. According to the program debugger, the sound file never loads and I don't know why this is happening. I even ran the program with administrator rights.


Brucey(Posted 2009) [#2]
Perhaps the sound isn't loaded yet - hence the null reference.

If you are using Framework, you need to ensure you are importing an appropriate "loader".


William Drescher(Posted 2009) [#3]
Well from the way I see it, shouldn't the BRL.Audio module load in MP3 files?


Brucey(Posted 2009) [#4]
Ah... no. mp3 is a proprietary format. By default, BlitzMax doesn't support it.

You will need to use a 3rd-party module for mp3 support.


William Drescher(Posted 2009) [#5]
Wow, they seemed to work originally... Maybe I had a module being imported that I didn't realize before I switched my system. I'll look into that, thanks for letting me know.


GfK(Posted 2009) [#6]
Don't use MP3 - its crap.

Use OGG format.


theHand(Posted 2009) [#7]
Just posting proof for those laymen (like me) who thought that MP3 only removed the frequencies that we couldn't hear:
Sorry

Still, it was a good opportunity to look that up. I've always wondered about it.