REDi's MaxMod problem

BlitzMax Forums/BlitzMax Module Tweaks/REDi's MaxMod problem

GfK(Posted 2007) [#1]
Hello.

Anybody else using this? I want my music to start playing at volume 0 and fade in. It works, but I always get a brief burst of full volume music before the volume changes to zero and the fade-in begins.

I've tried changing the default volume from 1 to 0 in the MaxMod bmx source but it didn't help.

Anybody know how to get around this?

[edit] Tested with 3 different sound drivers:

DirectSound - as described above
FreeAudio Default - as above but less noticable
FreeAudio DirectSound - works fine, but other sounds are crackly.

Maybe some sort of conflict going on? :/


tonyg(Posted 2007) [#2]
Get the same here until I did the following :
I noticed a parm error when trying to setstreamvolume before play.
When I change stream.bmx alVolume to 1.0 (rather than 1) it went away. I could then set setstreamvolume before stream.play and it worked OK.
I also tried to pause the stream then set the volume which resulted in an Unhandled Exception.
Anyway, by changing alVolume to 1.0 I can fade music in from volume 0 <EDIT> BUT I had to set the startvolume to -0.1 (just noticed I did that).



GfK(Posted 2007) [#3]
Thanks Tony - the -0.01 starting volume sorted it.

The other stuff you mentioned actually seems to make no difference.


tonyg(Posted 2007) [#4]
That was my fault for ignoring the 'change one thing at a time' rule.


REDi(Posted 2007) [#5]
Oops :P Fix will be up soon!

I might add a volume ramp function at some point, something like Stream.Ramp(DestinationVolume#,RampSpeedInMillisecs)

I'll wait for these new audio drivers to settle down a bit, then I'll have a go at rewriting maxmod to work along side the audio driver your using, so it'll either use freeaudio, directsound, or maintain its own openal stream.


GfK(Posted 2007) [#6]
I'll might add a volume ramp function at some point, something like Stream.Ramp(DestinationVolume#,RampSpeedInMillisecs)
Up to you, but personally I'd prefer to take care of that sort of stuff manually. :)


REDi(Posted 2007) [#7]
Fixed.