[vorbis-dev] Problems with vorbis sdk
John Denton
dentons at clara.co.uk
Tue Sep 11 15:36:24 PDT 2001
Hello Mr Smith,
----- Original Message -----
From: Michael Smith <msmith at labyrinth.net.au>
To: <vorbis-dev at xiph.org>
Sent: Tuesday, September 11, 2001 1:18 PM
Subject: Re: [vorbis-dev] Problems with vorbis sdk
> >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.
Err.. I know it is an example program, and that is *all* I would use it as..
For a Linux user it is probably a passable Win32 example program - for a
Windows user it is a very bad Win32 example program - which doesn't actually
work here, hence my original email..
But is the use of good old-fashioned C file i/o really so maximalist? Two
lines of code is all it takes - just the
same as the number of lines in the example to ensure the standard streams
are set to binary mode (which are then rendered redundant).. Why bother to
change? Well, you may know better than I, but as a command line proggie it's
very awkward to debug (ruddy-nigh impossible as far as I can see - but as I
said, it's years since I've seen its like). As a console prog I can single
step through it..
> 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.
Are you sure you're not reading something from 1990 too? :-)
> 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.
I'm glad to hear that the dlls don't do any file access - I was running out
of ideas.. I did mention in my first email that I'm using a Borland
compiler - hence I can't use the libraries that accompany the dlls, static
or otherwise. That said, the dlls are statically linked as I mentioned in my
last email. The process works perfectly well for other M$ dlls (Lame for
example, without a whisper of a problem) but I know many Borland users have
had problems with MSVC dlls - that's part of what I'm trying to work out..
> 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.
This has got crossed. The double backslash issue only applies using the prog
as is, i.e. from the command line. In that case I can't say where it fails -
using double backslashes in the redirections gives me an access denied error
after a little run time. Using single backslashes gives me an immediate
illegal op dialog. In order to try to debug this I converted the prog to a
console app by changing the use of stdin/out to FILE pointers. In that case,
stepping through the code it fails on the call to vorbis_encode_init. I can
place the two lines opening the i/o files (the only file access which
precedes that call) after this call and it still fails at the call to
vorbis_encode_init. This would seem to me to indicate that the failure is in
that call - or perhaps the preceding call to vorbis_init is returning an
error value for codec_setup. I'll check the return value.. Or perhaps I'm
unable to use these dlls from the Borland compiler - in which case I'd
dearly like to know why..
> >Love the OggDrop proggie... One day all programs will be like that :-)
>
> We can only eternally hope that that won't be true.
A sense of humour too.. That's nice at the end of a long day..
J.
--- >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