Trouble with Sound Library in Eclipse

Hi, I'm currently programming a hearthstone style card game in Eclipse using the processing libraries.

Today I wanted to add sound to the game, but got a problem: the program crashes instantly.

I'm a newbie to programming and processing, so I wasn't able to find the solution.

I imported the processing.sound library just like the processing.core .

I created a SoundFile Object in my Main class

package mediProjekt;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

import processing.core.PApplet;
import processing.sound.*;

public class Main extends PApplet {

    public static Player player;
    public static JAPAI japai;
    public static boolean playersTurn;
    public static boolean gameOver = false;
    public static Random randomGenerator;
    public static SoundFile mSound;

    public static void main(String[] args) {
      PApplet.main("mediProjekt.Main"); 
    }

    public void setup() {       
      mSound = new SoundFile(this, "onslaught.mp3");
      mSound.loop();
      [...]

So, when i run the program, the console just says:

java.lang.UnsatisfiedLinkError: no LIBWINPTHREAD-1 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at processing.sound.MethClaInterface.<clinit>(MethClaInterface.java:43)
    at processing.sound.Engine.<init>(Engine.java:35)
    at processing.sound.Engine.<init>(Engine.java:33)
    at processing.sound.Engine$LazyHolder.<clinit>(Engine.java:41)
    at processing.sound.Engine.start(Engine.java:45)
    at processing.sound.SoundFile.<init>(SoundFile.java:47)
    at mediProjekt.Main.setup(Main.java:55)
    at processing.core.PApplet.handleDraw(PApplet.java:2393)
    at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1540)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)

I have no idea what that means, or what I did wrong. Help would be appreciated :)

Answers

  • @BlueLightning -- were you able to resolve this issue?

    I'm not sure, but there are a number of open issues that lead to crashes with the Processing Sound library -- you might want to check out open issues and consider reporting yours:

    Some people who have recently reported sound issues in these forums have resolved them by switching to the minim library:

  • edited January 2017

    The Processing sound library has a number of OS specific native system libraries which have to be linked to the Eclipse project. I tried doing this but couldn't get it to work and used minim instead.

Sign In or Register to comment.