void LoadSampleFromStreamingAssets(GATDataAllocationMode mode, GATSampleInfo info, Dictionary <string, GATData> loadedSamples) { AGATAudioFile file; string path; GATData[] loadedChannels; int i; path = info.GetStreamingAssetFullPath(); using (file = AGATAudioFile.OpenAudioFileAtPath(path)) { loadedChannels = GATAudioLoader.SharedInstance.LoadSync(file, mode); } if (loadedChannels.Length == 1) { loadedSamples.Add(info.Name, loadedChannels[0]); return; } for (i = 0; i < loadedChannels.Length; i++) { loadedSamples.Add(string.Format("{0}_{1}", info.Name, i), loadedChannels[i]); } }
void LoadSampleFromStreamingAssets( GATDataAllocationMode mode, GATSampleInfo info, Dictionary< string, GATData > loadedSamples ) { AGATAudioFile file; string path; GATData[] loadedChannels; int i; path = info.GetStreamingAssetFullPath(); using( file = AGATAudioFile.OpenAudioFileAtPath( path ) ) { loadedChannels = GATAudioLoader.SharedInstance.LoadSync( file, mode ); } if( loadedChannels.Length == 1 ) { loadedSamples.Add( info.Name, loadedChannels[ 0 ] ); return; } for( i = 0; i < loadedChannels.Length; i++ ) { loadedSamples.Add( string.Format( "{0}_{1}", info.Name, i ), loadedChannels[ i ] ); } }