Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: .  (Read 8744 times)

0 Members and 1 Guest are viewing this topic.

Helios101

  • Newbie
  • *
  • Posts: 15
    • View Profile
.
« on: February 22, 2014, 05:36:53 am »
.
« Last Edit: May 03, 2018, 05:23:53 am by Helios101 »

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: Problem with playing sound
« Reply #1 on: February 22, 2014, 08:46:52 am »
Well, did the sound load successfully, or do you get that "Error! sound failed to load properly" message in the console that you defined? You did not mention that. :)
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: Problem with playing sound
« Reply #2 on: February 24, 2014, 07:23:14 am »
Quote
Sound duration: 0.0 seconds
Well, there you have the reason as to why you don't hear anything.

Now, I'm pretty sure that your sound is not actually 0 seconds long, so something is probably wrong with the file. I think have made the experience myself that SFML (or to be more exact: libsndfile) does not support all WAV formats, however, I cannot find a reference right now.

Do you know exactly what format your WAV file is in? If not, could you upload it?

EDIT:
Little update, the libsndfile website lists the supported formats. Not sure how I didn't find it earlier:
http://www.mega-nerd.com/libsndfile/
« Last Edit: February 24, 2014, 11:40:13 am by pdinklag »
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: Problem with playing sound
« Reply #3 on: February 26, 2014, 02:28:58 pm »
I'm honestly not sure. I know that the free tool Audacity can open as good as any WAV format. What I would do now is open that sound file in Audacity and save it as 16-bit PCM (pretty widespread standard that SFML can handle, too).

Would be nice to know if that works. Sorry I don't know an easier method right now. :(
JSFML - The Java binding to SFML.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Problem with playing sound
« Reply #4 on: February 26, 2014, 03:24:52 pm »
I tried to upload the sounds but they are too large.

Well the forums aren't designed for that... ever consider an external hosting site like this?
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor