Is there a way to get the
AudioData as an appropriate-type
It could be done by forcing a change of representation, such as passing through MathLink,
Uncompress[Compress[...], Hold], or similar. None of these is fast.
It could be done by just using AudioData and re-packing the result into a RawArray. This wasted memory. The typical audio representation uses 16-bit integers. Converting this to 64-bit integers or reals increases the storage requirements by a factor of 4.
Currently, there is no direct way to exchange
Audio objects with C code through LibraryLink, but there is a way to send/receive
This is not a problem for the similar
Image3D (also likely backed by
RawArray) because that is directly supported by LibraryLink (
RawArrays can be converted to