示例#1
0
        public byte[] GetAudioData(AudioScramblingMode audioScramblingMode)
        {
            if (audioScramblingMode == AudioScramblingMode.Default)
            {
                audioScramblingMode = (_isMpegOrAac ? AudioScramblingMode.Unsynchronization : AudioScramblingMode.Scrambling);
            }

            switch (audioScramblingMode)
            {
            case AudioScramblingMode.Scrambling:
                return(Scramble(_audioData));

            case AudioScramblingMode.Unsynchronization:
                return(ID3v2Utils.ReadUnsynchronized(_audioData));

            default:
                if (_audioData == null)
                {
                    return(null);
                }
                else
                {
                    return((byte[])_audioData.Clone());
                }
            }
        }