John Morton <jwm@eslnz.co.nz> said:
> Is there any particular reason why ov_read() packs floats to integer PCM
> inline, rather than being implemented in terms of ov_read_float() and a
> separate packing fucntion?
Historical reasons, mostly. ov_read() existed long before ov_read_float() did.
There's no compelling reason to change it.
>
> There are obviously many advantages doing audio manipulation on the floats
> before packing, but right now you have to reinvent the packing stage
yourself
> - in a replaygain backend that I'm working on, I ended up copying the
packing
> code from ov_read verbatim. Would a patch that split the packing out to a
> separate function be considered for inclusion in a future libvorbis
release?
>
> John
<p>Well, ov_read() does this packing for you as a convenience, but
providing it
seperately is really going beyond what vorbisfile is for - it's a library
for
decoding vorbis, not a library of generic audio manipulation functions. My
opinion is that this wouldn't really be suitable for going into
libvorbisfile.
It's not exactly complex code (since for most purposes you don't care
about
things like 8 bit output, signed/unsigned options, etc, it's trivial to
reimplement the bits of interest).
Mike
--- >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@xiph.org'
containing only the word 'unsubscribe' in the body. No subject is
needed.
Unsubscribe messages sent to the list will be ignored/filtered.