This site requires JavaScript, please enable it in your browser!
Greenfoot back
erdelf
erdelf wrote ...

2013/4/2

error sound code

1
2
erdelf erdelf

2013/4/2

#
So, I wanted to play a sound and I get the following error. I dont know what is causing the problem
1
2
3
Could not play sound file: file:/I:/Java/Greenfoot/scenarios/C1BA13/sounds/fire.wav
If you have a sound card installed, check your system settings.
java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_FLOAT 44100.0 Hz, 32 bit, stereo, 8 bytes/frame,  is supported.
JetLennit JetLennit

2013/4/2

#
sounds like a problem with the speaker.. could you display the code at and near you attempted to play the sound?
JetLennit JetLennit

2013/4/2

#
(p.s. when you are done with the begging program request here)
erdelf erdelf

2013/4/2

#
its the only line in a constructor
1
Greenfoot.playSound("fire.wav");
to the collection, I will upload tomorrow
I'm guessing you're telling the object to play the sound when it's created? I suggest that you have it that whatever shoots the object plays the sound, not the object being fired.
JetLennit JetLennit

2013/4/2

#
Is your speaker on/functional?
erdelf erdelf

2013/4/2

#
my speaker is functional, I am watching an tv episode on my 2nd screen. even if I change the placement of the line, the error still appears. I had to restart greenfoot to make sounds appear again and now the error code appears at the beginning, without even actively calling the sound file.
Maybe somethings wrong with your sound card? Is it updated to the newest version?
erdelf erdelf

2013/4/2

#
my sound card is working with other scenarios, and as I said I watch a tv episode. and yes it is updated to the newest version
JetLennit JetLennit

2013/4/2

#
I was going to ask that if he said it was fine....
Weird. I think that either something is wrong with the sound file itself, or something else is going on with your computer. Try making a new sound file, maybe in a different format, and if that doesn't work, maybe restart your computer. I can't see anything else that might be wrong.
JetLennit JetLennit

2013/4/2

#
what did you use to record/edit the sound?
erdelf erdelf

2013/4/2

#
fl studio 10,
Maybe you didn't export the file correctly that works with Greenfoot? I know some programs can be picking about bit rate or other things with sound files.
JetLennit JetLennit

2013/4/2

#
then try what @FlyingRabidUnicornPig said... thats all i can think of... other that the tv you have on taking up too much data on the speakers (when he basically said
FlyingRabidUnicornPig wrote...
Restart Everything
)
There are more replies on the next page.
1
2