Austin Hicks
unread,Aug 5, 2016, 2:40:50 PM8/5/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libaud...@camlorn.net
Hi,
As of yesterday evening, Libaudioverse 0.9a4 is up, closing a
significant gap in functionality.
A new function, Lav_bufferDecodeFromArray, allows decoding buffers
from in-memory files. If your buffer is exactly the content of the
audio file on disk, calling Lav_bufferDecodeFromArray is equivalent to
loading the file from disk. These buffers can come from anywhere, so
long as they are well-formed audio files. Examples of the use of
this function include storing sounds in sqlite databases or other
containers and basic sound encryption.
Note that Libaudioverse calls can be intercepted by a determined
attacker when Libaudioverse is dynamically linked, so this function is
not foolproof when used to protect art assets. Libaudioverse may
currently support static linking, but this is not a tested
configuration; expect proper static linking support for 0.10.
In Python, this is bound as the function Buffer.decode_from_array,
which should be passed either a string (Python 2) or a bytes (Python
3). Other objects may work, as long as they implement the buffer
interface. Objects which do not implement the buffer interface also
work, but are impractically slow and may be disallowed in future.
Finally, as a consequence of this work, the Python fast path for
objects supporting the ctypes buffer interface (i.e. functions taking
string arguments) will now work in more cases. As we don't use strings
heavily, this will be hard to notice outside microbenchmarks. I cannot
say how much of an improvement this is, as I didn't bother designing
microbenchmarks for it.