[sound] "...only works properly when the sketch is run as a 32-bit application"

Hey there! I've been using the sound library, and most of it works fine. However, when I try to generate a sinewave as follows:

import processing.sound.*;
SinOsc sine;

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

  // Create the sine oscillator.
  sine = new SinOsc(this);
  sine.play();
}

void draw() {
}

I get the following error:

"A library relies on native code that's not available. Or only works properly when the sketch is run as a 32-bit application."

I get this error when I try and use any of Sound's oscillators (SinOsc, SawOsc, SqrOsc, TriOsc, Pulse), but not other features of this library.

I'm running 64-bit windows 10, Intel core i7-3610QM CPU @ 2.3GHz, 8GB RAM, Java v7 update 80 build 1.7.0_80-b15.

Any ideas why?

Tagged:

Answers

  • Answer ✓

    Use an older version of sound library.

    The current one has a dependency on something odd that's causing that error. (Methcla library iirc)

  • Ok, want to hear something weird? When I run your code, in P3, on Win7 Pro 64 bit, I get the exact same error except is says at the end, "when the sketch is run as a 64-bit application". Sound 1.3.1 is the version. Yeah, something screwy going on there.

  • Very strange! I heeded koog's advice and downgraded to 1.2.1, and it seems to work. The only weird thing now is that the FFTSpectrum analyzer tends to crash a lot...

Sign In or Register to comment.