void AudioChannel::PlayRandomSample(const GuiSoundSet& soundSet, const float3& pos) { if (soundSet.sounds.empty()) return; const int soundIdx = guRNG.NextInt(soundSet.sounds.size()); const int soundID = soundSet.getID(soundIdx); const float soundVol = soundSet.getVolume(soundIdx); PlaySample(soundID, pos, soundVol); }
void AudioChannel::PlayRandomSample(const GuiSoundSet& soundSet, const float3& pos) { const int soundIdx = soundSet.getRandomIdx(); if (soundIdx < 0) return; const int soundID = soundSet.getID(soundIdx); const float soundVol = soundSet.getVolume(soundIdx); PlaySample(soundID, pos, soundVol); }