[vorbis-dev] Problems with vorbisfile

Caryfuk sim22um at axpsu.fpf.slu.cz
Sun Mar 18 06:05:51 PST 2001



On Sun, 18 Mar 2001, Maciej Miasik wrote:

> Hi,
> 
> I downloaded libvorbis plus vorbis-sdk, started a new project (a Win32
> console application) in my Visual C++ 6.0 Standard Edition under Windows
> ME, pasted vorbisfile_example.c to my only source file, fiddled with some
> include and lib directories and successfully compiled the example. It took
> me some time to get rid off of library symbols conflicts - I couldn't link
> the program with static libraries therefore I used the dynamic ones. I run
> the program and it immediately crashed in the kernel. Hmm...

In project settings in C/C++ select in category and then code generation.
And there select "Debug Multi-thread DLLs" or "Multi-thread DLLs". It
depends if you'r compilig debug or release. But DON'T mix debug vorbis
libraries with release Mutli-thread DLLs. When you use debug vorbis, you
must use debug DLLs or code will crash.
 
> I also had some problems with using ov_read() - I pass to this function a
> number of bytes I want it to return (the docs suggest 4096), but it always
> (at least with my ogg/vorbis files) returns 512 or less bytes depending on
> the current packet or something. It messed a bit my code because I had
> alreayd set up the playing buffers to be 4096 bytes in size and supposedly
> simple code suddenly became more complicated. I quickly figured out when I
> set the buffer to 512 bytes I needed to make only one additional call to
> ov_read() to fill the buffer - the buffer is always filled with 2 calls at
> most - this obviously would need more testing with my files but I wasn't
> writing all purpose decoder but the decoder capable of reading a well
> definded set of files. But this leads to one very important questions -
> couldn't just ov_read() return all the bytes the caller requests? Just one
> call to fill the buffer and job done and the code in ov_read() takes care
> of everything else... That code could be written with somone with deeper
> knowledge of ogg/vorbis files structure in order to avoid problems with
> missing packets/date freeing the users like me from digging into it - we
> just want to easily implement the decoding not to learn the technology
> inside out.
> 

I'vv got same problem. call ov_read with read of 4096 bites. You'r saying
read MAX 4096. And ov_reads one page or what. You must read untill you
fill your buffer with decompresed data. But beware of buffer owerflow.

If you'll have some more problem ask me. I've just finished ogg player in
VC 6.0 for windows.

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list