Class AudioFile

  • java.lang.Object
    • at.ofai.music.match.AudioFile


  • public class AudioFile
    extends java.lang.Object
    • Field Detail

      • audioIn

        protected javax.sound.sampled.AudioInputStream audioIn
      • format

        protected javax.sound.sampled.AudioFormat format
      • frameRate

        protected float frameRate
      • frameSize

        protected int frameSize
      • isReference

        protected boolean isReference
      • length

        protected long length
      • orientationX

        protected boolean orientationX
      • path

        protected java.lang.String path
      • pathLength

        protected int pathLength
      • refHopTime

        protected double refHopTime
      • refIndex

        protected int[] refIndex
      • selector

        protected at.ofai.music.match.GUI.FileNameSelection selector
      • thisHopTime

        protected double thisHopTime
      • thisIndex

        protected int[] thisIndex
    • Constructor Detail

      • AudioFile

        public AudioFile()
      • AudioFile

        public AudioFile(java.lang.String pathName,
                         at.ofai.music.match.GUI.FileNameSelection jb)
    • Method Detail

      • setMatch

        public void setMatch(int[] idx1,
                             double ht1,
                             int[] idx2,
                             double ht2,
                             int ln)
      • setFixedPoints

        public void setFixedPoints(FixedPoint p,
                                   boolean isX)
      • print

        public void print()
      • search

        public int search(int[] arr,
                          int val)
        Performs a binary search for a value in an array and returns its index. If the value does not exist in the array, the index of the nearest element is returned. If the value occurs multiple times in the array, the centre index is returned. Note that we can't use Arrays.binarySearch() because the array might not be full.
      • fromReferenceTime

        public long fromReferenceTime(double time)
      • fromReferenceTimeD

        public double fromReferenceTimeD(double time)
      • toReferenceTime

        public double toReferenceTime(long ltime)
      • toReferenceTimeD

        public double toReferenceTimeD(double time)
      • setPosition

        public long setPosition(long position)
                         throws java.io.IOException
        Throws:
        java.io.IOException