[vorbis-dev] Problems with vorbis sdk

Michael Smith msmith at labyrinth.net.au
Tue Sep 11 05:18:06 PDT 2001



>
>That comment wasn't intended to be taken quite so literally. Win32 *implied*
>to me that it would function within the GUI and I'm sure that will be the
>case, once I've tortured it a bit. I assumed that the example provided would
>also but it doesn't even work as a console program! It's a real
>old-fashioned DOS command line proggie - years and years out of date,
>un-necessarily awkward, obstruse and esoteric.. It was written by a Unix
>programmer, wasn't it?  How would someone with Windows ME or beyond manage
>to run it?

Err... that's an example program, designed to show how to use the libraries.
It's not MEANT to be used by end users. It happens to be a perfectably
acceptable tool for end users if they know how to use it - on both windows
and unix - but it's not what most users will see. It's not in any was obstruse
and esoteric, it's simply an absolutely minimal example of how to use the
libraries to encode. 

It's interesting to note that many tasks in windows are most easily
accomplished using command line tools - and in fact microsoft specifically
says to use command line tools (in windows!) for many tasks, if you start
reading detailed documentation.

>
>And I'm browsing DR DOS 6 manuals at the moment, bought in 1990 :-)
>
>If I rewrite the stdin and stdout lines in the example to use stdio FILE*
>streams the example program throws an Access error on the second call to the
>statically linked dlls.. That is, it passes
>    vorbis_info_init(&vi);
>and I can see that the variables in vi have in fact been zeroed, except
>codec_setup which is init to 00C70078. At the next line
>    vorbis_encode_init(&vi, 2, 44100, -1, 128000, -1);
>it fails with 'Exception class EAccessViolation - Access violation at
>address 0044120C. Read of address 2028260B'.
>
>I don't understand why it should fail here, given the nature of the changes.
>The dll source doesn't have a hardwired address or port access or something?
>Can't have - it would fail in the same place when compiled using stdin/out..
>Does the dll try to access stdin / stdout?

The libraries don't do any file access whatsoever - this crash is probably
due to windows linking problems. I found it far easier to use static linking
on windows due to the obstruseness of windows development tools. Can't say
more specifically what the problem here is - sorry. My recommendation is to
try linking with the static libraries, and see if your code works then. If
it does, then you'll have to get advice from a windows expert.

>> >     Project1 < c:\\temp\\test.wav > c:\\temp\\test.ogg
>>
>> Hmm, I don't think you need the double backslashes here.
>
>I didn't think so either, but that renders the example closest to working..
>With single slashes the prog immediately throws an 'Illegal operation'
>dialog.

Actually, that's probably because WITH the double backslashes, it fails
earlier - when opening the files. Without, it doesn't fail until it actually
calls into the library, when something weird happens.

>Love the OggDrop proggie... One day all programs will be like that :-)

We can only eternally hope that that won't be true.

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