# My sound file wont play or work and I don't know why

**URL:** https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445
**Category:** Libraries
**Created:** [November 13, 2019, 3:47am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445 "2019-11-13T03:47:37Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DudVudAura](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@DudVudAura](https://discourse.processing.org/u/DudVudAura)
#### Post date: [November 13, 2019, 3:47am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/1 "2019-11-13T03:47:38Z")

</div>

```auto
import processing.sound.*;
SoundFile file;
String audioName = "tank shot.wav";
String path;

void setup() {    
  frameRate(60);
  background(0);
  size(1500,1500);
  file = new SoundFile(this, "Sleigh Ride.mp3");
  file.play();
}

```

> Nov 12, 2019 9:44:23 PM com.jsyn.devices.javasound.JavaSoundAudioDevice   
> INFO: JSyn: default output latency set to 80 msec for Windows 10

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 13, 2019, 5:07am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/2 "2019-11-13T05:07:30Z")

</div>

please format your code as posting it into

```auto
</> code button

```

i use processing 3.5.3  
on win 10 64bit  
and run basic sound lib example with a added mp3 sound file for you,

```auto
import processing.sound.*;
SoundFile soundfile;
//String filename = "data/vibraphon.aiff";
String filename = "data/jingle.mp3";

void setup() {
  println("load: "+filename);
  soundfile = new SoundFile(this,filename);
  println("SFSampleRate= " + soundfile.sampleRate() + " Hz");
  println("SFSamples= " + soundfile.frames() + " samples");
  println("SFDuration= " + soundfile.duration() + " seconds");
  soundfile.loop();
}      

void draw() {}

```

and it works.

can see at console:

```auto
load: data/jingle.mp3
Nov 13, 2019 12:03:38 PM com.jsyn.devices.javasound.JavaSoundAudioDevice <init>
INFO: JSyn: default output latency set to 80 msec for Windows 10
SFSampleRate= 44100 Hz
SFSamples= 266112 samples
SFDuration= 6.0342855 seconds

```

---

<div class="post-metadata">

### Author: ![DudVudAura](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@DudVudAura](https://discourse.processing.org/u/DudVudAura)
#### Post date: [November 13, 2019, 5:42am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/3 "2019-11-13T05:42:29Z")

</div>

I also use processing 3.5.3 on windows 10 64 bit

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 13, 2019, 5:43am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/4 "2019-11-13T05:43:48Z")

</div>

pls repair above code posting

* * *

and you run my code as posted?  
or any problems?

---

<div class="post-metadata">

### Author: ![DudVudAura](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@DudVudAura](https://discourse.processing.org/u/DudVudAura)
#### Post date: [November 13, 2019, 5:45am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/5 "2019-11-13T05:45:53Z")

</div>

There isn’t like a limit to how long the sound can be right?

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 13, 2019, 5:47am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/6 "2019-11-13T05:47:06Z")

</div>

why you not answer my question?

i make that code example for you to run  
and test your system and hardware…  
as it runs here well.

---

<div class="post-metadata">

### Author: ![DudVudAura](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@DudVudAura](https://discourse.processing.org/u/DudVudAura)
#### Post date: [November 13, 2019, 5:48am UTC](https://discourse.processing.org/t/my-sound-file-wont-play-or-work-and-i-dont-know-why/15445/7 "2019-11-13T05:48:23Z")

</div>

I got it work, thanks for your help I figured out why it was just cause I’m dumb
