void InitManager()
{
__uniqueInstance = this;
#if !UNITY_5
if( _speakerModeInit == SpeakerModeBehaviour.Stereo )
{
AudioSettings.speakerMode = AudioSpeakerMode.Stereo;
}
else
{
AudioSettings.speakerMode = AudioSettings.driverCaps;
}
#endif
if( GATInfo.UniqueInstance == null )
{
GATInfo.Init();
}
GATInfo.UniqueInstance.SetSyncDspTime( AudioSettings.dspTime );
GATInfo.UniqueInstance.SetPulseLatency( _PulseLatency );
GATInfo.UniqueInstance.SetMaxIOChannels( _MaxIOChannels );
if( __allocator == null )
{
#if UNITY_EDITOR
if( Application.isPlaying )
#endif
{
__allocator = new GATDataAllocator( _AllocatorInitSettings );
}
}
//Static initializers
GATPlayer.InitStatics();
if( _defaultPlayer == null )
{
GameObject go = new GameObject( "DefaultPlayer" );
go.transform.parent = transform;
go.AddComponent< AudioSource >();
_defaultPlayer = go.AddComponent< GATPlayer >();
_defaultPlayer.AddTrack< GATTrack >();
}
DefaultPlayer = _defaultPlayer;
#if GAT_IOS && !UNITY_EDITOR
GATiOS.InitializeNativeGAudio( GATInfo.OutputSampleRate, GATInfo.AudioBufferSizePerChannel, ( byte )GATInfo.NbOfChannels );
#endif
}