Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » LOGG (Allegro 4) - changing stream volume

Credits go to Edgar Reynaldo for helping out!
This thread is locked; no one can reply to it. rss feed Print
LOGG (Allegro 4) - changing stream volume
Andrew Gillett
Member #15,868
January 2015

I can't work out how to change the volume of a stream. I can't find any docs for LOGG (but there appears to be no function for changing volume); I also can't find anything about changing volume in the libvorbis docs.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

LOGG uses allegro's audio streams (I think, I hope, I'm guessing...), so from the manual entry for play_audio_stream, you can use the voice functions to change the volume.

Quote:

If you want to adjust the pitch, volume, or panning of a stream once it is playing, you can use the regular voice_*() functions with stream->voice as a parameter.

Untested. I assume in the LOGG header you can find the voice parameter to pass to the functions.

Andrew Gillett
Member #15,868
January 2015

I had never noticed that Allegro had its own audio streaming stuff - until I was stepping in the debugger and it stepped into that code. I added a function to return the voice for a stream.

Go to: