Exemple #1
0
 // Volume should be on a [0, 100] scale
 void adjustToVolume(AudioSource channel, int volume)
 {
     if (channel.clip)
     {
         float     scaledVolume = volumeToDecimalf(volume);
         AudioFile file         = fileList.GetAudioFile(channel.clip);
         scaledVolume  *= file.Volumef;
         channel.volume = scaledVolume;
     }
 }