MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / Sound_UpdateEffectAttributes

Function Sound_UpdateEffectAttributes

TombEngine/Sound/sound.cpp:905–914  ·  view source on GitHub ↗

Update gain and pitch.

Source from the content-addressed store, hash-verified

903
904// Update gain and pitch.
905bool Sound_UpdateEffectAttributes(int index, float pitch, float gain)
906{
907 if (index >= SOUND_MAX_CHANNELS || index < 0)
908 return false;
909
910 BASS_ChannelSetAttribute(SoundSlot[index].Channel, BASS_ATTRIB_FREQ, 22050.0f * pitch);
911 BASS_ChannelSetAttribute(SoundSlot[index].Channel, BASS_ATTRIB_VOL, gain);
912
913 return true;
914}
915
916// Update whole sound scene in a level.
917// Must be called every frame to update camera position and 3D parameters.

Callers 1

SoundEffectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected