SFML community forums

Help => Audio => Topic started by: Moonkis on March 18, 2013, 08:01:19 pm

Title: Sf::Music - Supported file format but file is malformed.
Post by: Moonkis on March 18, 2013, 08:01:19 pm
I'v googled the problem before making a new thread but I'v failed to see any solutions to my problem. I downloaded the LATEST ( as time of writing ) SFML 2.0 from Github and compiled it fresh ( static ), I'v added the x86 versions of openAL and libsnd that was inside of the SFML-master, included the include that's inside master and of course linked to the freshly compiled libs as well.

I'm still getting the error though and I really don't know what to do. I'm on Windows 7 ( 64 bit ).

I'm sorry if this has been asked a couple hundred of times!

Kind regards,
Moonkis.

EDIT:
#include <SFML\Audio.hpp>
int main(int argc, char **argv)
{
        sf::Music m;
        m.openFromFile("s.ogg");
        return 0;
}
 
Title: Re: Sf::Music - Supported file format but file is malformed.
Post by: Laurent on March 18, 2013, 08:17:45 pm
Quote
Supported file format but file is malformed
Is this the error message that you get in the console?
Where did you get your ogg file? Did you try to re-encode it?
Title: Re: Sf::Music - Supported file format but file is malformed.
Post by: Moonkis on March 18, 2013, 08:59:27 pm
Yes I did get that in the console window. I was using an .ogg file I converted with ffmpeg ( from .mp3 -> .ogg ), VLC can play it just fine but somehow it just fails.

I tried using one from this site:
http://rpg.hamsterrepublic.com/ohrrpgce/Free_Sound_Effects#Sound_Effect_Downloads

and that worked. Obviously there is something wrong with the ffmpeg conversion process that VLC can ignore but SFML can't? Do you have any idea why?


A tid off topic but to avoid future, do you perhaps know a better conversion program? And is .mp3 support considered as a future update ( saw a topic about it from 2010. ).

Title: Re: Sf::Music - Supported file format but file is malformed.
Post by: Laurent on March 18, 2013, 09:03:56 pm
Quote
Obviously there is something wrong with the ffmpeg conversion process that VLC can ignore but SFML can't? Do you have any idea why?
No, I'm using libsndfile for audio loading, I don't do it directly.

Quote
A tid off topic but to avoid future, do you perhaps know a better conversion program?
No.

Quote
And is .mp3 support considered as a future update
No, mp3 will never be supported since it's not royalty-free.
Title: Re: Sf::Music - Supported file format but file is malformed.
Post by: Moonkis on March 18, 2013, 09:17:55 pm
No, I'm using libsndfile for audio loading, I don't do it directly.
Oh, yeah, no I guess VLC doesn't? Well, thanks for the answers and sorry for the false alarm :)