Stop and free desired sound slot.
| 854 | |
| 855 | // Stop and free desired sound slot. |
| 856 | void Sound_FreeSlot(int index, unsigned int fadeout) |
| 857 | { |
| 858 | if (index >= SOUND_MAX_CHANNELS || index < 0) |
| 859 | return; |
| 860 | |
| 861 | if (SoundSlot[index].Channel != NULL && BASS_ChannelIsActive(SoundSlot[index].Channel)) |
| 862 | { |
| 863 | if (fadeout > 0) |
| 864 | BASS_ChannelSlideAttribute(SoundSlot[index].Channel, BASS_ATTRIB_VOL, -1.0f, fadeout); |
| 865 | else |
| 866 | BASS_ChannelStop(SoundSlot[index].Channel); |
| 867 | } |
| 868 | |
| 869 | SoundSlot[index].Channel = NULL; |
| 870 | SoundSlot[index].State = SoundState::Idle; |
| 871 | SoundSlot[index].EffectID = SOUND_NO_CHANNEL; |
| 872 | } |
| 873 | |
| 874 | // Update sound position in a level. |
| 875 | bool Sound_UpdateEffectPosition(int index, Pose *position, bool force) |
no outgoing calls
no test coverage detected