Beispiel #1
0
        public void GroupChannels()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

            //Console.WriteLine("ReserveChannels: " + result.ToString());
            Assert.IsTrue(result == 8);
            QuitAudio();
        }
Beispiel #2
0
        public void ExpireChannel()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

            result = SdlMixer.Mix_ExpireChannel(1, 100);
            //Console.WriteLine("HaltChannel: " + result.ToString());
            Assert.IsTrue(result == 1);
            QuitAudio();
        }
Beispiel #3
0
        public void HaltMusic()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

            SdlMixer.Mix_LoadMUS("test.wav");
            result = SdlMixer.Mix_HaltMusic();
            Assert.IsTrue(result == 0);
            QuitAudio();
        }
Beispiel #4
0
        public void GroupNewer()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

            result = SdlMixer.Mix_GroupOldest(1);
            //Console.WriteLine("GroupOldest: " + result.ToString());
            Assert.IsTrue(result == -1);
            QuitAudio();
        }
Beispiel #5
0
        public void VolumeMusic()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

            SdlMixer.Mix_LoadMUS("test.wav");
            result = SdlMixer.Mix_VolumeMusic(SdlMixer.MIX_MAX_VOLUME);
            Console.WriteLine("Volume: " + result.ToString());
            Assert.IsTrue(result == SdlMixer.MIX_MAX_VOLUME);
            QuitAudio();
        }
Beispiel #6
0
        public void VolumeChunk()
        {
            InitAudio();
            int    result   = SdlMixer.Mix_GroupChannels(0, 7, 1);
            IntPtr chunkPtr = SdlMixer.Mix_LoadWAV("test.wav");

            result = SdlMixer.Mix_VolumeChunk(chunkPtr, SdlMixer.MIX_MAX_VOLUME);
            Console.WriteLine("Volume: " + result.ToString());
            Assert.IsTrue(result == SdlMixer.MIX_MAX_VOLUME);
            QuitAudio();
        }
Beispiel #7
0
        public void FadeOutChannel()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

            SdlMixer.Mix_LoadWAV("test.wav");
            result = SdlMixer.Mix_FadeOutChannel(1, 100);
            Thread.Sleep(500);
            Console.WriteLine("PlayChannel: " + result.ToString());
            Assert.IsTrue(result != -1);
            QuitAudio();
        }
Beispiel #8
0
        public void FadeInChannelTimed()
        {
            InitAudio();
            int    result   = SdlMixer.Mix_GroupChannels(0, 7, 1);
            IntPtr chunkPtr = SdlMixer.Mix_LoadWAV("test.wav");

            result = SdlMixer.Mix_FadeInChannelTimed(1, chunkPtr, -1, 0, -1);
            Thread.Sleep(500);
            Console.WriteLine("PlayChannel: " + result.ToString());
            Assert.IsTrue(result != -1);
            QuitAudio();
        }