Update gain and pitch.
| 903 | |
| 904 | // Update gain and pitch. |
| 905 | bool 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. |