X-FI sound card problems

BlitzMax Forums/BlitzMax Programming/X-FI sound card problems

siread(Posted 2010) [#1]
I'm getting complaints from Creative X-FI sound card owners that the sound is cutting out during a game:
http://www.newstargames.com/newstarforum/showthread.php?p=103976

It seems to be occurring when the car goes off the race track, at which point the game will stop the sound channel playing a looped sound then reallocate it in order to start a different looped sound...

		If oldterrain <> terrain
			If chn_MyTerrain
				chn_MyTerrain.Stop()
				chn_MyTerrain = Null
			EndIf
			
			Select terrain
			Case CTERRAIN_TARMAC
				chn_MyTerrain = AllocChannel()
				chn_MyTerrain.SetVolume(GetVolume())
				PlaySound(snd_Engine, chn_MyTerrain)
				
			Case CTERRAIN_BLANK	
				chn_MyTerrain = AllocChannel()
				chn_MyTerrain.SetVolume(GetVolume())
				PlaySound(snd_Grid, chn_MyTerrain)
				
			Case CTERRAIN_PITLANE
				chn_MyTerrain = AllocChannel()
				chn_MyTerrain.SetVolume(GetVolume())
				PlaySound(snd_Recharge, chn_MyTerrain)
				
			End Select
		EndIf


The really strange thing is that this causes all other channels to stop playing, except for one (the narrator's). Unfortunately I don't have one of these cards to test the game. Any ideas?


GfK(Posted 2010) [#2]
Are you using OpenAL?

I hit limitations with channels on some hardware, and found the way around it was to use SetAudioDriver("OpenAL Generic Software") instead.

[edit] btw - we reviewed SLR on blitzmonkeys.com a while back.


siread(Posted 2010) [#3]
Hey, nice review! I've added the link to the game page:
http://www.newstargames.com/slr.html

I'll try out your suggestion for OpenAL...


siread(Posted 2010) [#4]
Seems to have done the trick. Thanks Gfk. :)