[Vorbis-dev] Wav to Ogg Vorbis conversion
Erik de Castro Lopo
mle+la at mega-nerd.com
Fri Mar 11 13:11:34 PST 2011
Dmitriy Reznik wrote:
> Thank you for your answer. It looks way simpler than what I was trying
> to do. Could you please answer a few of my questions?
> 1) Can I add libsndfile to my MFC project, and if yes, how?
I provide a 32 and 64 bit windows setup.exe style installers. Those
installers provide libsndfile-1.dll, the required header files and
documentation and a couple of exampe Visual Studio projects.
> Because I
> need to be able to distribute the software in one executable.
libsndfile is releases under the LGPL license so one executable is
not possible unless you release your source code.
> 2) I have to convert to ogg vorbis not .wav files, but raw wave data
> stored in multiple BYTE (unsigned char) arrays.
But what does that data represent? Shuffling pcm audio data around as
BYTE arrays is a brain damaged practive encouraged by Microsofts APIs.
> Could you please tell me how the code should look then?
That completely depends on what that data represents. The libsndfile
source code tree contains numerous example and demo projects. YOu
should look at those to begin with in conjunction with reading the
documentation.
> Erik, I also don't see what data and frames are.
In that code, data was a pointer to short. See:
http://www.mega-nerd.com/libsndfile/api.html#write
and frames is the number if frames of shorts. See:
http://www.mega-nerd.com/libsndfile/FAQ.html#Q012
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the Vorbis-dev
mailing list