OpenAL only plays sound 1-2 times with 1.38 (Mac)

Archives Forums/BlitzMax Bug Reports/OpenAL only plays sound 1-2 times with 1.38 (Mac)

TMK(Posted 2010) [#1]
I'm having some problems with the newest 1.38's OpenAL fix on Mac Intel, while it works fine on Windows.

I'm using the following code:

Graphics 400,300
EnableOpenALAudio()
SetAudioDriver("OpenAL")

sound = LoadSound("sound.wav")

While Not KeyDown(key_escape)
	If KeyHit(key_p)
		Print "Playing sound"
		PlaySound sound
	EndIf
	
	Cls
	Flip
Wend

If I use BlitzMax 1.38, and compile and run it on my Mac Mini, it will only play the sound twice, after that it never plays it again when I press the P button.

If I however replace "openalaudio.bmx" with the one from BlitzMax 1.37, and re-build the module, it works fine...

I've tested it on Mac OS Tiger, Leopard and Snow Leopard, and same result. I haven't had this problem before updating to 1.38 and I only use my Mac Mini for compiling BlitzMax projects...

Is there something I'm doing wrong or does anyone else have this problem? Thanks!


GfK(Posted 2010) [#2]
Don't have a Mac but if you get the same drivers you get in Windows, try "OpenAL Generic Software".


TMK(Posted 2010) [#3]
Unfortunately that audio driver didn't exist so it didn't play any sound... if I print out AudioDrivers() list on my Mac Mini, I get these:

OpenAL Default
OpenAL
FreeAudio
FreeAudio CoreAudio

I tried both OpenAL and OpenAL Default and both didn't work properly in 1.38 (they play the sound twice, then stops), but works perfectly in 1.37. FreeAudio works though.


marksibly(Posted 2010) [#4]
Hi,

Ok, had a look at this and it appears to be a bug in Mac OpenAL - I've had a look through the source and it definitely isn't doing something it should be!

I'll try posting the bug on the mailing list, but in the meantime I strongly suggest you use FreeAudio on the Mac.


marksibly(Posted 2010) [#5]
Hi,

A guy from Apple confirmed it's a bug - my second OpenAL bug find on the Mac!

I have reported both bugs to Apple via their official bug reporting system, so now all we can do is wait for fixes...from experience, it could take a while.


TMK(Posted 2010) [#6]
Ah, great to hear that! Hopefully they will fix it some day :)


jhans0n(Posted 2010) [#7]
This still appears to be an issue for me in 1.41. Same bug, or new iteration?

I ended up building one of my games with 1.37 to work around it.