Menu

Sound volume, OpenAL

Help
Daniel
2018-01-14
2018-01-15
  • Daniel

    Daniel - 2018-01-14

    Hi!
    For some reason I cannot figure out how to change the sound volume of my soundEmitter....
    This does not work for !?

    with SFXHolder.Behaviours.Behaviour[0] as tglbSoundEmitter do
    begin
    Source.Volume:= 1 * (TrackBar.Position / 100);
    end;

    Using OpenAL as soundmanager.

    Cheers!

     
  • Jerome.D (BeanzMaster)

    Hi Daniel it's a "bug" in the current version you can only set the master volume. I'm already correct this for the next update. Soon i hope. But need to finish Vector/FastMath units before. In waiting
    in the unit GLSMOpenAL in procedure TGLSMOpenAL.UpdateSource(aSource : TGLBaseSoundSource);

    at around line 306:
    if sscStatus in aSource.changes then
    begin
    alSourcef(aSource.ManagerTag,AL_PITCH,1.0);
    CheckOpenALError;

    just add this line just after the begin

        alSourcef(aSource.ManagerTag,AL_GAIN,aSource.Volume);
    

    it will be ok

     
  • Daniel

    Daniel - 2018-01-15

    Works nicely! Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.