1
votes

I need your help today as I'm trying to get to a new area of programming for my project : audio encoding.

I'm currently developing a windows-only Qt C++ project (using msvc compilers). What I can do right now is record audio files from the mic as raw .pcm files.

What I need to do is either : record directly to .ogg audio files the microphone or just convert the files I can create to ogg files.

What I have done is read Qt documentation about audio recording, and try to understand vorbis/ogg documentation. I couldn't find any raw pcm to ogg code example for vorbis/ogg, but maybe you guys know where I can find code like that.

What I need to know is if what I want to achieve is possible, and if so, I would really appreciate if you could point me at stuff that will help me achieve my goal.

Basically, I'm happy because I can get audio files in pcm format of what I want, but now I need to encode those files into .ogg files. I want to know if it is possible using ogg/vorbis, and if so, which steps should I follow and what should I read to understand what I'm doing.

Thank you to anyone who took time to read my question, have a nice day,

Eyal

1

1 Answers

2
votes

There's an "examples" directory inside the libvorbis source code distribution. You should take a look at encoder_example.c.