Sound and Music Problems - help please
Blitz3D Forums/Blitz3D Programming/Sound and Music Problems - help please
| ||
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? |
| ||
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. |
| ||
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! |
| ||
and nay on the redundant reloading... when it comes to coding, I try to keep my file loading down to one load per file |
| ||
perhaps a code snippet of your loading, and then another of your init/playing the sound/music. Maybe its a channel problem. |
| ||
here's a code snippet I did to test the problem: |
| ||
try this and see if it still mucks upmysound=LoadSound("song17.s3m") LoopSound mysound PlaySound (mysound) while not keyhit(1) wend freesound mysound end |
| ||
shall do... I'll post back when I can.. gotta get back home (using a library computer for the internet) :P |
| ||
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? |
| ||
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. |
| ||
thanks! downloading now :) |
| ||
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. |
| ||
Bass' license is free if you're using it in a freeware project (or 'cost free', which sounds a little better). |