private static string GetAudioType(AudioClip audioClip) { if (AudioClip.HasType(audioClip.File.Version)) { return(audioClip.Type.ToString()); } else { return(audioClip.CompressionFormat.ToString()); } }
public static bool IsSupported(AudioClip audioClip) { if (AudioClip.HasType(audioClip.File.Version)) { switch (audioClip.Type) { case FMODSoundType.AIFF: case FMODSoundType.IT: case FMODSoundType.MOD: case FMODSoundType.S3M: case FMODSoundType.XM: case FMODSoundType.XMA: case FMODSoundType.VAG: case FMODSoundType.AUDIOQUEUE: return(true); default: return(false); } } else { switch (audioClip.CompressionFormat) { case AudioCompressionFormat.PCM: case AudioCompressionFormat.Vorbis: case AudioCompressionFormat.ADPCM: case AudioCompressionFormat.MP3: case AudioCompressionFormat.VAG: case AudioCompressionFormat.HEVAG: case AudioCompressionFormat.XMA: case AudioCompressionFormat.GCADPCM: case AudioCompressionFormat.ATRAC9: return(true); default: return(false); } } }