Example #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());
                }
            }
        }
Example #2
0
        public byte[] GetAudioData(AudioScramblingMode audioScramblingMode)
        {
            if (audioScramblingMode == AudioScramblingMode.Default)
            {
                audioScramblingMode = this.m_IsMpegOrAac ? AudioScramblingMode.Unsynchronization : AudioScramblingMode.Scrambling;
            }
            switch (audioScramblingMode)
            {
                case AudioScramblingMode.Unsynchronization:
                    return Utils.ReadUnsynchronized(this.m_AudioData);

                case AudioScramblingMode.Scrambling:
                    return AudioText.Scramble(this.m_AudioData);
            }
            if (this.m_AudioData == null)
            {
                return null;
            }
            return (byte[]) this.m_AudioData.Clone();
        }
Example #3
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();
            }
        }
Example #4
0
        public byte[] GetAudioData(AudioScramblingMode audioScramblingMode)
        {
            if (audioScramblingMode == AudioScramblingMode.Default)
            {
                audioScramblingMode = this.m_IsMpegOrAac ? AudioScramblingMode.Unsynchronization : AudioScramblingMode.Scrambling;
            }
            switch (audioScramblingMode)
            {
            case AudioScramblingMode.Unsynchronization:
                return(Utils.ReadUnsynchronized(this.m_AudioData));

            case AudioScramblingMode.Scrambling:
                return(AudioText.Scramble(this.m_AudioData));
            }
            if (this.m_AudioData == null)
            {
                return(null);
            }
            return((byte[])this.m_AudioData.Clone());
        }