Sound and Music Problems - help please

Blitz3D Forums/Blitz3D Programming/Sound and Music Problems - help please

AvestheFox(Posted 2009) [#1]
I seem to be having a problem with sound files...

After 2 or 3 minutes of runtime anything that's playing sound, whether it be music or regular sound files in general starts making this horrible static noise and becomes distorted.

And no, this doesnt seem to have anything to do with my code, as I have tested this problem outside my code. It seems to be Blitz3D itself.

And it seems to only do this on my laptop (I've ran tests on two other computers with no problem)

Midi's play just fine... but wav, it, mod, or anything that plays 'real' sound falls flat and becomes an earsore

any ideas here?


RifRaf(Posted 2009) [#2]
And it seems to only do this on my laptop (I've ran tests on two other computers with no problem)


i think then the problem may be with your laptop. its possible for sound cards (chip) to go bad, awhile back my laptop sound went out the same way. eventually it wouldnt play any kind of sound/music at all.

what happens when you load the same "real sounds" into say windows media player and set it to loop, then play it for the same amount of time?

Also , are you reloading the sounds over and over? laptops have less memory (generally speaking of causal laptops) than a desktop rig and may show memory related issues you dont see on a desktop in a short time.


AvestheFox(Posted 2009) [#3]
aye, but these files play just fine on any other software. My laptop is my only soarce for music and videos these days :P

Perhaps I should just switch to a desktop computer for my project needs, but the only desktop I have is slower than granny's driving and I need to reinstall drivers for the soundcard (which I do not seem to have...) :P whoopie!


AvestheFox(Posted 2009) [#4]
and nay on the redundant reloading... when it comes to coding, I try to keep my file loading down to one load per file


RifRaf(Posted 2009) [#5]
perhaps a code snippet of your loading, and then another of your init/playing the sound/music.

Maybe its a channel problem.


AvestheFox(Posted 2009) [#6]
here's a code snippet I did to test the problem:




RifRaf(Posted 2009) [#7]
try this and see if it still mucks up
mysound=LoadSound("song17.s3m")
LoopSound mysound
PlaySound (mysound)
while not keyhit(1)
wend
freesound mysound
end



AvestheFox(Posted 2009) [#8]
shall do... I'll post back when I can.. gotta get back home (using a library computer for the internet) :P


AvestheFox(Posted 2009) [#9]
nope... still messing up... :P

is there possibly a switch I can flip on and off in my system to get this thing to work right?


Kryzon(Posted 2009) [#10]
Try using Bass Studio for Blitz3D:
http://blitzbasic.com/toolbox/toolbox.php?tool=207

It's an addon audio engine, so if it still gives the same error, you know it's your laptop and not B3D.


AvestheFox(Posted 2009) [#11]
thanks! downloading now :)


jfk EO-11110(Posted 2009) [#12]
Using Bass may not be a solution (isn't bass license fee based, kind of?)

However, I had the same problem. But it occassionally happened with other Games too. It may be a DirectSound Problem.

When you're in Fullscreen mode, try Alt-Tabbing out, then go back to the game again. This sometimes heales the soundchip. Tho, only sometimes, and it sucks to have such a sometimes yes, sometimes no behaviour.

It may however be a good idea to watch carefully how many channels you have opened. Soundcards have a limited number of voices, the problem may be related to this circumstance, even if DirectX should be capable to downmix all sounds to 2 channels by Software.

Maybe the problem can be solved if you try some soundcard settings, eg. reduce the hardware accelleration of sound output, etc.


Kryzon(Posted 2009) [#13]
Bass' license is free if you're using it in a freeware project (or 'cost free', which sounds a little better).