Problem with playing online audio using minim

hello,
I tried to loadsample with an URL using Minim, but the sound can’t be loaded. Anyone has an idea? Thanks in advance!

minim = new Minim(this);
sample = minim.loadFile(“http://www.soundcities.com/global/mp3s/aarhus/aarhus_atmosphere_3737.mp3”, 2048);
sample.loop();

I wasn’t able to play the sound either.

Maybe it’s because the internet site is protected against non-browser programs.

It might work if you download the MP3, store locally and play from there.

Hey, and welcome to the forum!

Great to have you here!

Warm regards,

Chrisir

This works by the way:

import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;

void setup() {
  size(800, 880);

  Minim  minim = new Minim(this);
  AudioPlayer sample = minim.loadFile("http://www.drpetter.se/files/sfxdemo.mp3");
  println(sample.length()); 
  sample.loop();
}

void draw() {
  //
}
//