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

Author Topic: Saving to .ogg?  (Read 4869 times)

0 Members and 1 Guest are viewing this topic.

Jamin Grey

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Of Stranger Flames
Saving to .ogg?
« on: May 14, 2009, 02:39:34 am »
I'm trying to save recorded sound to a .ogg format. Using a sf::SoundBuffer, I call the SaveToFile function, and named the file 'test.ogg', but the file doesn't appear. 'test.wav' works, though.

I see on the features page, "Can load and save standard sound formats : ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64". Is saving to ogg vorbis supported in SFML, or just the loading?

I couldn't see .ogg at all (saving or loading), on libsndfile's homepage, so I'm probably looking in the wrong place.
Of Stranger Flames - My work-in-progress para-historical (and classically-inspired) 2D rpg.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Saving to .ogg?
« Reply #1 on: May 14, 2009, 11:11:42 am »
ogg handling has been added to libsndfile recently, and is part of SFML 2.0 (you can get the latest sources in the "sfml2" branch from SVN). If you're on Linux, you'll need at least libsndfile 1.0.18.
Laurent Gomila - SFML developer

Jamin Grey

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Of Stranger Flames
Saving to .ogg?
« Reply #2 on: May 14, 2009, 11:21:40 pm »
Thanks, I can save .ogg files now.

And thank you for the excellent API.
Of Stranger Flames - My work-in-progress para-historical (and classically-inspired) 2D rpg.

 

anything