Class MP3ShuffleOverlay

  • All Implemented Interfaces:
    AudioOverlay

    public class MP3ShuffleOverlay
    extends MP3SequenceOverlay
    This class returns the MP3 data bytes randomized according to a seed.
    Author:
    Richard Rudek
    • Constructor Detail

      • MP3ShuffleOverlay

        public MP3ShuffleOverlay​(byte[] bytes,
                                 long seed)
                          throws AudioNotFoundException
        Adds a shuffle overlay to a given byte array containing an MP3 file. This overlay retrieves only the data bytes of the MP3 file and returns the bytes randomized according to a seed.
        Parameters:
        bytes - byte array containing an MP§ file
        seed - seed to shuffle the byte order by
        Throws:
        AudioNotFoundException - if the given byte array is null or does not contain an MP3 file
    • Method Detail

      • createOverlay

        protected void createOverlay​(long seed)
        Shuffles the data byte order randomly according to the seed.
        Overrides:
        createOverlay in class MP3SequenceOverlay
        Parameters:
        seed - the seed that influences the dataByteOrder