hendriks73 / ffsampledsp

FFmpeg based service provider for javax.sound.sampled.
GNU Lesser General Public License v2.1
24 stars 5 forks source link

I have a question #12

Closed Kokecena closed 2 years ago

Kokecena commented 2 years ago

I am trying to use your library and I follow the instructions as it comes on the page, I only put the dependency inside the POM but when loading an MP3 it throws me java.lang.UnsatisfiedLinkError: no ffsampledsp-x86_64-win in java.library.path Did I do something wrong or did I skip a step?

hendriks73 commented 2 years ago

What does your POM look like? Have you built the library locally at some point?

Kokecena commented 2 years ago

it looks like this

4.0.0
<groupId>com.mycompany</groupId>
<artifactId>ReproductorDeMusica</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>

</properties>

<dependencies>
    <!--MigLayout-->
    <dependency>
        <groupId>com.miglayout</groupId>
        <artifactId>miglayout-swing</artifactId>
        <version>5.3</version>
    </dependency>
    <!--FlatLaf-->
    <dependency>
        <groupId>com.formdev</groupId>
        <artifactId>flatlaf</artifactId>
        <version>1.6.1</version>
    </dependency>
    <!--Read and Manipulating MP3 data-->
    <dependency>
        <groupId>com.mpatric</groupId>
        <artifactId>mp3agic</artifactId>
        <version>0.9.1</version>
    </dependency>
    <!--Test-->
    <dependency>
        <groupId>jacomp3player</groupId>
        <artifactId>JACo-mp3</artifactId>
        <version>0.9.4</version>
    </dependency>
    <!--Test-->
    <dependency>
        <groupId>javazoom</groupId>
        <artifactId>jlayer</artifactId>
        <version>1.0.1</version>
    </dependency>
    <!--Test-->
    <dependency>
        <groupId>com.tagtraum</groupId>
        <artifactId>ffsampledsp-complete</artifactId>
        <version>0.9.37</version>
    </dependency>
</dependencies>

And no built library locally

hendriks73 commented 2 years ago

Thanks for pointing me to this issue - it's the packaging that went wrong (I have recently updated the whole build pipeline and moved it to GitHub actions).

I believe the issue is fixed in 0.9.38, available later today or tomorrow.

hendriks73 commented 2 years ago

I believe the issue is fixed in 0.9.38, available later today or tomorrow.

Hm. Perhaps not 0.9.38, simply because Sonatype is causing issues.

hendriks73 commented 2 years ago

Please try version 0.9.41, when it is available later today or tomorrow.

Thanks.

hendriks73 commented 2 years ago

Is the issue solved, @Kokecena ?

Kokecena commented 2 years ago

Is the issue solved, @Kokecena ?

@hendriks73 I apologize for not answering, I delayed building my gamer PC haha, yesterday I checked and version 37 came out, today I checked again and it continues to come out ..., is it that there are still problems with Sonatype?

Sorry for my bad english :p , it is basic and i use google traductor

Kokecena commented 2 years ago

@hendriks73 I was reviewing the commits and the last one you tried to do, 41, did not pass all the tests

Kokecena commented 2 years ago

Netbeans confused me, I tried placing version 41 and I loaded it correctly, but now it sends me this error

nov 27, 2021 4:37:45 PM com.tagtraum.ffsampledsp.FFNativeLibraryLoader arch
INFORMACIÓN: Using arch=x86_64
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
    at com.tagtraum.ffsampledsp.FFURLInputStream.<init>(FFURLInputStream.java:51)
    at com.tagtraum.ffsampledsp.FFAudioFileReader.getAudioInputStream(FFAudioFileReader.java:248)
    at com.tagtraum.ffsampledsp.FFAudioFileReader.getAudioInputStream(FFAudioFileReader.java:267)
    at com.tagtraum.ffsampledsp.FFAudioFileReader.getAudioInputStream(FFAudioFileReader.java:210)
    at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1181)
        ....
        ....

Version 0.9.32 works fine for me, I just want to make a basic player, but I will be aware of the updates you make and I will tell you if it sends any errors.

hendriks73 commented 2 years ago

On which Java version do you observe this?

Kokecena commented 2 years ago

@hendriks73 I use version 8, Even now that you mention it, I'm going to try version 16, I have installed too

Kokecena commented 2 years ago

Sorry for the delay, I tried compiling the project with JDK 16 and played songs without problems, I only have problems running it in version 8

hendriks73 commented 2 years ago

Ah. That's because of the covariant return type introduced in Java 9. See for example https://github.com/eclipse/jetty.project/issues/3244

v0.9.43 should fix the issue (available today or tomorrow).

hendriks73 commented 2 years ago

@Kokecena Did it work for you? Can I close this issue?

Kokecena commented 2 years ago

Yes, it already works perfectly in Java 8 it no longer sends me an error attached to an image playing a song, thanks for solving this problem image

hendriks73 commented 2 years ago

Thanks for making me aware of it!