3D sound error at 1024x768

Blitz3D Forums/Blitz3D Programming/3D sound error at 1024x768

NTense(Posted 2003) [#1]
This is truely strange. I receive a memory access violation error on loading a specific 3dSound ONLY when I'm running the program at 1024x768! Below is my code. When I run the program in any other resolution (640x480 -> 1600x1200), the code runs fine, but if I run it in 1024x768, I get the error, with the IDE pointing to Global Spray1 sound load.. If I comment out that load, the program loads fine. Kind of strange, but I don't want to eliminate that gfx mode from gameplay if I don't have to. Any thoughts?

; Load 3D - Sounds
Global SpawnSound = Load3DSound("Sounds\oceano.wav"):AddLoadBar()
Global FootfallGrass1 = Load3DSound("Sounds\GrassyStep3.wav"):AddLoadBar()
Global FootfallGrass2 = Load3DSound("Sounds\GrassyStep4.wav"):AddLoadBar()
Global Gun1 = Load3DSound("Sounds\Gun1.wav"):AddLoadBar()
Global Spray1 = Load3DSound("Sounds\105mmCN1.wav"):AddLoadBar() ;<<<<<<<<<<<<< This gives me the problems
Global Explosion1 = Load3DSound("Sounds\Explosion1.wav"):AddLoadBar()
Global PowerUP_Pop = Load3DSound("Sounds\PowerUp_Pop.wav"):AddLoadBar()
Global Rico_1 = Load3DSound("Sounds\Ricochet1.wav"):AddLoadBar()
Global Rico_2 = Load3DSound("Sounds\Ricochet2.wav"):AddLoadBar()
Global Whisk  = Load3DSound("Sounds\Whisk.wav"):AddLoadBar()

; Load Local Sounds



NTense(Posted 2003) [#2]
As an addendum... The error doesn't occur if I compile it out to an .exe file (which is good).. Though I'm confused as to why I get the error running it through the default IDE.


Shambler(Posted 2003) [#3]
What happens if you put that Spray1 line at the end?

Strange bug -.-

What is AddLoadBar doing? Maybe the error is in there.


NTense(Posted 2003) [#4]
I still get the error at Spray1 even if I move it to the end. Also, I commented out the loadbar function (Just updates the load progress bar on the splash screen), and still get the error in the same place (Spray1). I agree. it's a very strange bug. It works if I compile to an .exe external of the IDE, but won't run in the IDE under that resolution.


Shambler(Posted 2003) [#5]
*Stabs in the dark, try upgrading graphics card driver, but how on earth one particular graphics res is making it crash when loading a sound is beyond me ^^


Hotcakes(Posted 2003) [#6]
Graphics and sound shouldn't be linked so closely together. Weird. Maybe that particular sound file is in stereo? That can cause problems when used as a 3DSound...

What does the debugger have to say?