OGG files after BlitzMax 1.34 not playing

BlitzMax Forums/BlitzMax Programming/OGG files after BlitzMax 1.34 not playing

Chalky(Posted 2009) [#1]
I use this to start background music in my game:

SFX_MusicChannel=AllocChannel()
SetChannelVolume(SFX_MusicChannel,Volume#)
PlaySound(SFX_Music,SFX_MusicChannel)

This works perfectly in BlitzMax 1.34, but I get no sound at all when compiling in 1.35 or 1.36. Is this related to the "bad ref" errors mentioned in mark's "Avoid V135 RC5!" thread or has something changed which requires me to alter my code?


Chalky(Posted 2009) [#2]
Ok - no replies must mean I am the only one with the problem. :o)

For BlitzMax 1.34, Framework Assistant suggested (I have included all suggestions here, regardless of their relevance to Audio playback):
Framework brl.D3D7Max2D
Import brl.RamStream
Import brl.PNGLoader
Import brl.WAVLoader
Import brl.OGGLoader
Import brl.Retro
Import brl.FreeTypeFont
Import pub.Win32
Import brl.FreeAudioAudio
Import brl.BMPLoader
Import brl.JPGLoader
for which OGG playback worked (under 1.34, but not 1.35 or 1.36).

After commenting out the Framework and Import lines and recompiling, the playback of OGG files was restored in BlitzMax 1.36. However, I now cannot work out how to get it working when including a Framework command.

For BlitzMax 1.36, Framework Assistant suggests:
Framework brl.D3D7Max2D
Import brl.RamStream
Import brl.PNGLoader
Import brl.WAVLoader
Import brl.OGGLoader
Import brl.Retro
Import brl.System
Import brl.FreeTypeFont
Import brl.FreeAudioAudio
Import brl.JPGLoader
Import brl.BMPLoader
but OGG file playback does not work. Can anyone please help?


Jesse(Posted 2009) [#3]
I have the same problem although I can't get it to play OGG and wave files. Apparently FreeAudioAudio fails to work with the new version. I had to switch to DirectSoundAudio.


Chalky(Posted 2009) [#4]
Thanks Jesse - FreeAudioAudio was the cause. Dunno how I missed the fact it no longer works but switching to DirectSoundAudio did indeed fix the problem. :o)


Jesse(Posted 2009) [#5]
If compatibility is an issue to you, I would revert back to 1.34 until they fix that issue. I don't have Vista or windows 7 but I heard that Direct Sound has a lag with these two operating systems.


Chalky(Posted 2009) [#6]
Thanks for the heads-up - I will do that then as I don't have Vista or Windows 7 either, so cannot do any testing. Pity though as I would have preferred to be using the latest release of Max...


_Skully(Posted 2009) [#7]
Thread should be moved to Bug Reports.


Grey Alien(Posted 2009) [#8]
Has FreeAudio really been removed?


Grey Alien(Posted 2009) [#9]
Seems like Freeaudio is still there in BMax 1.36.

Direct Sound has a lag with these two operating systems.
Freeaudio definitely has a lag on those two systems, seen it myself. That's why I use OpenAL for them and FreeAudio for 98/ME/2000/XP.


CoCoder(Posted 2015) [#10]
Hi all!

I recently updated to the latest release of BlitzMAX and I have also found this issue of playing OGG files.

The last version I used prior to this new release was I think also 1.34.

Is this then a bug?? I don't want the hassle of converting all my OGG files to WAV or MP3. Yikes.

I get no errors when using OGG files, just no sound at all.


CoCoder(Posted 2015) [#11]
Ok, ok. Found a fix for this bug/problem....

Instead of using BRL.FreeAudioAudio, use BRL.DirectSoundAudio instead.

This seems to work perfectly if anyone is interested ;-)


Xerra(Posted 2015) [#12]
I am. I remember having this problem a couple of weeks back and forgot to actually post here asking about it. Thanks a lot for the heads-up.


skidracer(Posted 2015) [#13]
So this is an issue with Framework Assistant?

I thought DirectSoundAudio replaced FreeAudio as default some time ago (on Windows targets only).

Oh, thread is 5 years old...


CoCoder(Posted 2015) [#14]
Yeah I noticed this thread is old too. Sorry!

Just thought as id ran into the same problem NOW I would post a solution.

Hopefully will help some people out.


Xerra(Posted 2015) [#15]
I'm assuming the author of framework assistant isn't around to modify the program now?