private string GetAudioTrackDescription(VideoClipImporter importer, ushort audioTrackIdx) { ushort sourceAudioChannelCount = importer.GetSourceAudioChannelCount(audioTrackIdx); string arg = (sourceAudioChannelCount != 0) ? ((sourceAudioChannelCount != 1) ? ((sourceAudioChannelCount != 2) ? ((sourceAudioChannelCount != 4) ? (((int)(sourceAudioChannelCount - 1)).ToString() + ".1") : sourceAudioChannelCount.ToString()) : "Stereo") : "Mono") : "No channels"; return(importer.GetSourceAudioSampleRate(audioTrackIdx) + " Hz, " + arg); }
private string GetAudioTrackDescription(VideoClipImporter importer, ushort audioTrackIdx) { var channelCount = importer.GetSourceAudioChannelCount(audioTrackIdx); string channelCountStr = channelCount == 0 ? "No channels" : channelCount == 1 ? "Mono" : channelCount == 2 ? "Stereo" : channelCount == 4 ? channelCount.ToString() : // Can be 3.1 or quad ((channelCount - 1).ToString() + ".1"); return(importer.GetSourceAudioSampleRate(audioTrackIdx) + " Hz, " + channelCountStr); }