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

            //Console.WriteLine("ReserveChannels: " + result.ToString());
            Assert.IsTrue(result == 8);
            QuitAudio();
        }
Exemple #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();
        }
Exemple #3
0
        public void HaltMusic()
        {
            InitAudio();
            int    result   = SdlMixer.Mix_GroupChannels(0, 7, 1);
            IntPtr chunkPtr = SdlMixer.Mix_LoadMUS("test.wav");

            result = SdlMixer.Mix_HaltMusic();
            Assert.IsTrue(result == 0);
            QuitAudio();
        }
Exemple #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();
        }
Exemple #5
0
        public void VolumeMusic()
        {
            InitAudio();
            int    result   = SdlMixer.Mix_GroupChannels(0, 7, 1);
            IntPtr chunkPtr = 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();
        }
Exemple #6
0
        public void Volume()
        {
            InitAudio();
            int result = SdlMixer.Mix_GroupChannels(0, 7, 1);

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

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