carb::audio::ChooseType
Defined in carb/audio/IAudioGroup.h
-
enum class carb::audio::ChooseType
names of possible methods for choosing sounds to play from a sound group.
These are used with the chooseSound() function. The probabilities of each sound in the group are only used when the ChooseType::eRandom selection type is used.
Values:
-
enumerator eRandom
choose a sound from the group at random using each sound’s relative probabilities to perform the selection.
By default, all sounds in a group will have a uniform probability distribution. The tendency to have one sound selected over others can be changed by changing that sound’s probability with setProbability().
-
enumerator eNext
chooses the next sound in the group.
The next sound is either the first sound in the group if none has been selected yet, or the sound following the one that was most recently selected from the group. Even if another selection type was used in a previous call, this will still return the sound after the one that was most recently selected. This will wrap around to the first sound in the group if the last sound in the group was previously selected.
-
enumerator ePrevious
chooses the previous sound in the group.
The previous sound is either the last sound in the group if none has been selected yet, or the sound preceding the one that was most recently selected from the group. Even if another selection type was used in a previous call, this will still return the sound before the one that was most recently selected. This will wrap around to the last sound in the group if the first sound in the group was previously selected.
-
enumerator eFirst
always chooses the first sound in the group.
-
enumerator eLast
always chooses the last sound in the group.
-
enumerator eRandom