SetChannelPan with DirectSound screwy

BlitzMax Forums/BlitzMax Bug Reports/SetChannelPan with DirectSound screwy

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

From the examples, with tiny modification....

Graphics 640, 480

SetAudioDriver("DirectSound")

channel = AllocChannel ()
sound = LoadSound ("C:\Program Files\BlitzMax\samples\digesteroids\sounds\fire.wav") ' Use a short sample...

Repeat
	If MouseHit(1) PlaySound sound,channel
	
	pan# = MouseX () / (GraphicsWidth () / 2.0) - 1
	vol# = 1 - MouseY () / 480.0
	SetChannelPan channel, pan
	SetChannelVolume channel, vol*2

	Cls
	DrawText "Click to play...", 240, 200
	DrawText "Pan   : " + pan, 240, 220
	DrawText "Volume: " + vol, 240, 240

	Flip
Until KeyHit (KEY_ESCAPE)

End


On my machine, any pan above 0.1 or below -0.1 moves the sound *all the way* to the appropriate speaker, not just a 90%/10% balance like it should.

To hear it correctly, comment out the SetAudioDriver command and use the default driver. It works fine.

[edit] I am on Vista with a Sound Blaster X-Fi card. All drivers up-to-date.