AudioSettings.speakerMode

static var speakerMode : AudioSpeakerMode

Description

Sets or gets the current speaker mode. Default is 2 channel stereo.

Be aware that the audio system is bootstrapped, when a new speaker mode is set, meaning that all playing AudioSources are stopped. If a speaker mode is set beyond the drivers capability, the audio behaviour is undefined. Use AudioSettings.driverCaps to get the capabilities of the current driver.

JavaScript
    // To set the speaker mode to that of the system settings.
AudioSettings.speakerMode = AudioSettings.driverCaps;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Example() {
AudioSettings.speakerMode = AudioSettings.driverCaps;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
AudioSettings.speakerMode = AudioSettings.driverCaps