[Vorbis-dev] Accessing codec_setup members through a vorbis_info variable

Ben Cohee bpcohee at gmail.com
Sat Jun 25 06:03:03 PDT 2005


Hello all,

I am currently doing a partial port of vorbisenc to java.  Partial
port being that I am just concerned with 44kHz and above stereo
coupled modes.  I have done the grunt work of converting the 44kHz
static code and res book data structures to java classes and want to
verify that my data of the Java app matches that of C app.

I'm pretty tired so instead of babbling an explanation basiclly what I
am looking for from the vorbis encoder_example.c:


vorbis_info_init(&vi);
ret=vorbis_encode_init_vbr(&vi,2,44100,.5);
printf( "long bitrate_nominal = %ld", vi.bitrate_nominal );

printf( "long blocksizes[0] = %ld", vi.codec_setup.blocksizes[0] );
printf( "long blocksizes[1] = %ld", vi.codec_setup.blocksizes[1] );
printf( "int modes = %d", vi.codec_setup.modes );
...
...


I know this is more of a C syntax question involving void * struct
pointers, but me and C-style pointers never got along much,  I am all
googled out, and I figured some of you C gurus would know the casts I
need.

I wanted to try and access these without recompiling the vorbisenc.lib
with some helper functions cause Im only using MSVC++ Free Command
Line tools, so I dont have access to the .dsp files used for the
libvorbis Win32 make.  If this isnt possible I'd write the functions
if someone wouldnt mind inserting them vorbisenc.c and building the
lib for me.

Thanks in advance fellas,
_ben


More information about the Vorbis-dev mailing list