1

I have an SDL app, that works under Linux, Mac and Windows. It's something like a media player, and can play audio just fine. I'd like to add audio recording feature to it, but I'd like to encode it in real time to MP3. Can anyone point me to an example how can I use LibLame, LibSoX, or possibly some other library to achieve this?

-- OR --

I'm also willing to rewrite the whole thing into something easier to manage than C++. I've looked at Kivy and Love2d which uses Lua, but audio recording it's still an issue there. If you know ANY toolkit that:

  • is cross platform
  • helps you build GUI using your own graphics
  • can play AND record mp3 files
  • ideally can operate under framebuffer (no X Window server under Linux)

Please let me know. I'm looking at Python + Pygame + Pyaudio, it can do graphics and output sound, but still can't record MP3's, only WAV's. Any way to integrate LAME into this to make it work?

mav
  • 1,230
  • 1
  • 15
  • 23

1 Answers1

2

FMOD can play practically anything, and handle audio input as well, although I don't know if integrating an entire audio engine is a bit overkill for your project. It's free for non-commercial usage.

As for encoding, LAME is definitely the de-facto choice for MP3. There's a very simple library called lame_enc.dll which wraps LAME's capabilities in a simple API. It's Windows only, but you could look at it's source for a good reference on how to use LAME.

untitled8468927
  • 676
  • 4
  • 13
  • I've used FMOD before, but I couldn't make it to record audio to MP3 on non-Windows platforms, so unfortunately it doesn't fit :(. – mav Mar 05 '12 at 21:06