[opus] How to use op_test_callbacks ?
Fred van Stappen
fiens at hotmail.com
Sat Jan 28 13:31:46 UTC 2017
I have succeffully open a memory buffer from a url-opus-file with (from Pascal fpc):
HandleOP := op_test_memory(BufferURL,PipeBufferSize, Err);
I can retrieve the tags infos, all seems ok.
But for reading, using this gives 0 outframes:
outframes := op_read_float(Data.HandleOP, at Buffer, Wantframesm, nil);
I suspect that some callback must be defined.
In opusfile library there is:
OP_WARN_UNUSED_RESULT OggOpusFile *op_test_callbacks(void *_source,
const OpusFileCallbacks *_cb,const unsigned char *_initial_data,
size_t _initial_bytes,int *_error) OP_ARG_NONNULL(2);
Maybe it is what I need in place of op_test_memory().
But I do not understand what is _source and initial_data.
Also how to use OpusFileCallbacks.
Some example will be highly appreciated how to use op_test_callbacks() with the memory buffer (or how to use op_read_float() with op_test_memory()) . (In C or Pascal).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the opus