Need help with sound volume

BlitzPlus Forums/BlitzPlus Programming/Need help with sound volume

SuperDan(Posted 2003) [#1]
When I use the ChannelVolume command it works fine if I set it to between 0.1 and 1.0 but, if I set the volume to 0 then the volume is set to full. Hmmm.
Also, another thing, if a computer has no sound card I get an 'Error starting module bbaudiodriver' message. How would I get around this?
Any help would be fantastic. Thanks.

I am using blitz+ 1.35


semar(Posted 2003) [#2]
When I use the ChannelVolume command it works fine if I set it to between 0.1 and 1.0 but, if I set the volume to 0 then the volume is set to full.

I *think* (and guessing) that this is a known issue that will be (eventually) addressed.
Right now, just use small values like 0.0001 to shut-up the sound. Or, use PauseChannel when the volume to set reaches null.

if a computer has no sound card I get an 'Error starting module bbaudiodriver' message. How would I get around this?

http://www.blitzbasic.com/codearcs/codearcs.php?code=264

Hope this helps,
Sergio.


SuperDan(Posted 2003) [#3]
Thanks muchly semar.

Dan.


Texas Instruments Calculator 1K


SuperDan(Posted 2003) [#4]
Actually, that doesn't work semar.

;here is my code

voices=true
If LoadSound(c:\Sounds\move.wav") = 0
voices=False
EndIf

This bit of code works OK, if the sound is found then voices remains True.
But, if you disable your sound card from Device Manager (or use a computer with no s/card), you get the 'Error starting module bbaudiodriver' message.

I think this error occurs even before any code is translated.

If anyone has any Ideas then please help. Otherwise I will have to not use sound in my app which would be a shame 'cos I spent two weeks doing the sounds.


Anthony Flack(Posted 2003) [#5]

Otherwise I will have to not use sound in my app


Will it actually work without errors if you don't use any sound then? That in itself is a lucky break.

You could always have it as a config option. Hardly ideal, I know. Perhaps someone who knows more about such things than I can point you in the direction of a DLL call that will give you the ID of the soundcard, or lack of soundcard, or summat.


SuperDan(Posted 2003) [#6]
Yes it works fine with no sound thankyou very much. I have trapped every error I could think of. I left the sound 'till last so didn't come accross the problem until trying my program on a few computers at work, some of which have no soundcard.

The DLL thing sounds like a good idea, maybe there's something stored in the registry too. I'll look into that.

Tattaa fur naa. Dan.