Re: [AD] Audio plugin function names

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 05 October 2008, Chris Robinson wrote:
> On Sunday 05 October 2008 12:39:39 pm Thomas Fjellstrom wrote:
> > I already said whats so bad about it, it has no real virtio interface
>
> Just as real as other libs (*cough*vorbisfile*cough*), regardless of the
> ugliness of the internals. The IO callbacks are nearly identical to the
> standard C functions. I use it myself to read from memory data instead of a
> disk file, without issue.

With vorbis and ogg you CAN pass in read/write functions just fine, so I don't 
see the likeness. sndfile has a hack that somehow bypasses its incomplete fd 
handler..

And we can't assume a fd handler interface will work. files inside zip files 
don't have fds, and they are compressed, so you can't just pass the fd for the 
zip file in and expect it to work.

I was planning on lookin at sndfile's hacked api and working with it.. Here's 
what the dev has to say about his api:

> I consider it a horrible and very ugly hack
> and hence haven't got around to documenting it yet.
> See the file tests/virtual_io_test.c in the source code tarball.

I haven't actually taken a look at it yet, so I'm not sure if it'll do what we 
need. Most of sndfile uses specific functions that don't call into a vtable or 
anything so I'm honestly not sure how or if it works.

> > , I
> > asked the developer about it and he said he added some /hack/ with a dumb
> > example allowing that sort of thing, but its not part of the libs
> > external supported api.
>
> I wouldn't see it going away any time soon.. at least as long as standard
> file IO doesn't have its own methods for virtual IO. Who knows.. maybe with
> a bit of elbow grease, someone can help him clean it up and put the regular
> filename and fd handlers on top of the virtio functionality.

He has fd and filename handlers, he doesn't have a sane virtio interface 
though ;)

> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/