You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there!
Im writing a Java application wich supposed to receive audio files, calculate fingerprint, and search track based on it.
But Im facing a problem that the sample Java interop code you mention in README doesnt work.
Here is my code
File file = new File("song.mp3");
System.out.println(file.exists());
System.out.println(file.length());
AudioSource source = new AudioSource.AudioFileSource(file);
Fingerprinter fingerprinter = new Fingerprinter();
Fingerprint fingerprint = fingerprinter.apply(source).unsafeRunSync();
System.out.println(fingerprint.compressed());
Here is the exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at javazoom.spi.mpeg.sampled.convert.DecodedMpegAudioInputStream$DMAISObuffer.append(DecodedMpegAudioInputStream.java:294)
at javazoom.jl.decoder.Obuffer.appendSamples(Obuffer.java:59)
at javazoom.jl.decoder.SynthesisFilter.compute_pcm_samples(SynthesisFilter.java:1510)
at javazoom.jl.decoder.SynthesisFilter.calculate_pcm_samples(SynthesisFilter.java:1550)
at javazoom.jl.decoder.LayerIIIDecoder.decode(LayerIIIDecoder.java:324)
at javazoom.jl.decoder.LayerIIIDecoder.decodeFrame(LayerIIIDecoder.java:219)
at javazoom.jl.decoder.Decoder.decodeFrame(Decoder.java:147)
at javazoom.spi.mpeg.sampled.convert.DecodedMpegAudioInputStream.execute(DecodedMpegAudioInputStream.java:185)
at org.tritonus.share.TCircularBuffer.read(TCircularBuffer.java:138)
at org.tritonus.share.sampled.convert.TAsynchronousFilteredAudioInputStream.read(TAsynchronousFilteredAudioInputStream.java:197)
at org.tritonus.share.sampled.convert.TAsynchronousFilteredAudioInputStream.read(TAsynchronousFilteredAudioInputStream.java:182)
at chromaprint.AudioSource$.$anonfun$audioInputStreamToByteStream$8(AudioSource.scala:59)
at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:87)
at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:376)
at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:316)
at cats.effect.internals.IOShift$Tick.run(IOShift.scala:36)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Hey there!
Im writing a Java application wich supposed to receive audio files, calculate fingerprint, and search track based on it.
But Im facing a problem that the sample Java interop code you mention in README doesnt work.
Here is my code
Here is the exception:
Also, here is the track: https://mega.nz/file/mO5DTbRA#f-3EUFlPbHs47eYfNMLiElaA3gbA4yJzP-8RtZR1V1c
Java version: 1.8
Library version: 0.3.1
What am I doing wrong?
The text was updated successfully, but these errors were encountered: