FATAL EXCEPTION: Animation Thread

edited November 2016 in Android Mode

Hello everybody. I'm new with Android Mode for processing and I'm trying to synth sound in my android device but I get this error:

FATAL EXCEPTION: Animation Thread Process: processing.test.sinewave, PID: 1816 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/processing.test.sinewave-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libMethClaInterface.so" at java.lang.Runtime.loadLibrary(Runtime.java:366) at java.lang.System.loadLibrary(System.java:988) at processing.sound.MethClaInterface.(Unknown Source) at processing.sound.Engine.(Unknown Source) at processing.sound.Engine.(Unknown Source) at processing.sound.Engine$LazyHolder.(Unknown Source) at processing.sound.Engine.start(Unknown Source) at processing.sound.SinOsc.(Unknown Source) at processing.test.sinewave.SineWave.setup(SineWave.java:41) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:818)

The code that I was trying to execute was this (It is one form the examples of the Sound library):

/*
This is a sine-wave oscillator. The method .play() starts the oscillator. There
are several setters like .amp(), .freq(), .pan() and .add(). If you want to set all of them at
the same time use .set(float freq, float amp, float add, float pan)
*/

import processing.sound.*;

SinOsc sine;

float freq=400;
float amp=0.5;
float pos;

void setup() {
    size(640, 360);
    background(255);

    // Create and start the sine oscillator.

    sine = new SinOsc(this);

    //Start the Sine Oscillator. 
    sine.play();
}

void draw() {

  // Map mouseY from 0.0 to 1.0 for amplitude
  amp=map(mouseY, 0, height, 1.0, 0.0);
  sine.amp(amp);

  // Map mouseX from 20Hz to 1000Hz for frequency  
  freq=map(mouseX, 0, width, 80.0, 1000.0);
  sine.freq(freq);

  // Map mouseX from -1.0 to 1.0 for left to right 
  pos=map(mouseX, 0, width, -1.0, 1.0);
  sine.pan(pos);
}

I hope you can help me!!!

Answers

  • edited October 2016

    please format your code

  • Done... :) I will be very greatful if you can help me :)

  • @juecastro===

    i never used this lib; yet, looking to the error code i think that the problem you get is not from the code but from the lib itself which is not well installed: it needs MethCla which is an audio engine for mobile devices; when i get some more time i ll try to understand more precisely what you missed.

  • @juecastroco===

    ok, i have installed the lib but seen that it does not install the MethCla; you have to do that with command line (only osX && linux for my lib version)::

    Processing MethCla Interface

    This is a processing interface and a collection of plugins for MethCla, a leight-weight, efficient sound engine for mobile devices methcla.

    Building the libMethClaInterface

    The library requires a compiled shared library of MethCla for each platform. There are specific Makefile in the src folder which compile the JNI library. For the moment this library is OSX + Linux only. To build the JNI Lib simply rename the respective Makefile_x to Makefile and do

    $make $make install

    in the src/cpp folder.

    The Java Library is to be compiled with ant. Please install the latest version on ant on your computer. The build.xml file is in in the root folder. Core.jar needs to be compiled and ready in ../../../core/library. To compile do

    $ ant

    in the root folder.

  • edited November 2016

    @juecastroco===

    i have compiled with ant the MethaCla interface; it does nothing; and there is NT ANY build.xml in the root folder (yet i can see it on github...); i will try to copy it but i think there is a problem with the lib itself. When i try to run your code or any from the code example it compiles without error and install the app on the phone; but when i try to launch it it crashes silently at start and i get not any error message in the console...Sorry!

Sign In or Register to comment.