Beispiel #1
0
        // Changes the volume of the given sound
        public bool changeVolume(ref Sound sound, float volume)
        {
            if(sound.channel== -1)
                return false;

            sound.volume=	volume;
            Al.alSourcef(sound.channel, Al.AL_GAIN, pMasterVolume*sound.pVolume);

            return true;
        }
Beispiel #2
0
        // Stops the given sound from playing
        public void stopSound(Sound sound)
        {
            if(sound.channel== -1)
                return;

            Al.alSourceStop(sound.channel);
        }
Beispiel #3
0
 // Finds if the given sound is playing
 public bool isSoundPlaying(Sound sound)
 {
     return isChannelPlaying(sound.channel);
 }