Klasse WhatsSidSupport

java.lang.Object
sidplay.fingerprinting.WhatsSidSupport

public final class WhatsSidSupport extends Object
WhatsSID? client part of tune recognition. Use a WhatsSID capture buffer to match a currently played tune. Capture buffer contains always the last N seconds of sound samples in a ring buffer.
Autor:
ken
  • Felddetails

    • CHANNELS

      private static final int CHANNELS
      Number of channels.
      Siehe auch:
    • downSampler

      private final Resampler downSampler
      Resampler to 8Khz.
    • RANDOM

      private final Random RANDOM
      Random source for triangular dithering
    • oldRandomValue

      private int oldRandomValue
      State of HP-TPDF.
    • whatsSidBuffer

      private ByteBuffer whatsSidBuffer
      Capture buffer.
    • whatsSidBufferSize

      private int whatsSidBufferSize
      Capacity of the capture buffer.
    • lastWhatsSidMatch

      private volatile MusicInfoWithConfidenceBean lastWhatsSidMatch
      Last match
    • minimumRelativeConfidence

      private double minimumRelativeConfidence
      Minimum confidence to detect a match
  • Konstruktordetails

    • WhatsSidSupport

      public WhatsSidSupport(double cpuFrequency, int captureTimeInS, double minimumRelativeConfidence)
  • Methodendetails

    • output

      public boolean output(int valL, int valR)
      Output sample data to fill WhatsSid capture buffer
      Parameter:
      valL - left channel sample data
      valR - right channel sample data
      Gibt zurück:
      capture buffer full
    • match

      Match WhatsSid capture buffer using the given matcher
      Parameter:
      matcher - matcher used to match the capture buffer contents
      Gibt zurück:
      matched music info or null (no match)
      Löst aus:
      IOException - I/O error
    • reset

      public void reset()
      Reset the capture buffer (call for a new tune to play)
    • triangularDithering

      private int triangularDithering()
      Triangularly shaped noise source for audio applications. Output of this PRNG is between ]-1, 1[.
      Gibt zurück:
      triangular noise sample
    • createWAV

      public byte[] createWAV()
      Create WAV sample data form ring-buffer.
      Gibt zurück:
      WAV bytes