Example #1
0
        private void stereoSwapped_Click(object sender, System.EventArgs e)
        {
            FMOD.RESULT result;

            result = system.playSound(FMOD.CHANNELINDEX.FREE, sound2, true, ref channel);
            ERRCHECK(result);

            /*
             *  Clear out all speakers first.
             */
            result = channel.setSpeakerMix(0, 0, 0, 0, 0, 0, 0, 0);
            ERRCHECK(result);

            /*
             *  Put the left channel of the sound in the right speaker.
             */
            {
                float[] levels = { 0, 1.0f };    /* This array represents the source stereo sound.  l/r */

                result = channel.setSpeakerLevels(FMOD.SPEAKER.FRONT_LEFT, levels, 2);
                ERRCHECK(result);
            }

            /*
             *   Put the right channel of the sound in the left speaker.
             */
            {
                float[] levels = { 1.0f, 0 };    /* This array represents the source stereo sound.  l/r */

                result = channel.setSpeakerLevels(FMOD.SPEAKER.FRONT_RIGHT, levels, 2);
                ERRCHECK(result);
            }

            result = channel.setPaused(false);
            ERRCHECK(result);
        }