Displaying 4 results from an estimated 4 matches for "flac__streamdecoderwritecallback".
2004 Sep 10
2
Storing FLAC in Matroska
...char* argv[])
{
//Create the FLAC stream decoder
FLAC__StreamDecoder *flac_file = FLAC__stream_decoder_new();
//Setup the callbacks
FLAC__stream_decoder_set_read_callback(flac_file,
(FLAC__StreamDecoderReadCallback)flac_DecoderReadCallback);
FLAC__stream_decoder_set_write_callback(flac_file,
(FLAC__StreamDecoderWriteCallback)flac_DecoderWriteCallback);
FLAC__stream_decoder_set_metadata_callback(flac_file,
(FLAC__StreamDecoderMetadataCallback)flac_DecoderMetaDataCallback);
FLAC__stream_decoder_set_error_callback(flac_file,
(FLAC__StreamDecoderErrorCallback)flac_DecoderErrorCallback);
//Set our data up
flacData *fla...
2013 Feb 09
2
Newbie question about those callbacks
For instance the write_callback thing:
client_data ? can it be a pointer to just about anything? For instance
a pointer to a two-dimensional array?
Are those FLAC-WAV and WAV-FLAC examples the only examples available?
What would be the best approach to read a FLAC file to an array of
some kind? Passing a pointer to the array as ?client_data?? I'd like
to use a two-dimensional array, but
2013 Feb 10
0
Newbie question about those callbacks
...nberg wrote:
> For instance the write_callback thing:
> client_data ? can it be a pointer to just about anything?
I assume you mean:
https://www.xiph.org/flac/api/group__flac__stream__decoder.html#ga13
which defines the type:
typedef FLAC__StreamDecoderWriteStatus
(* FLAC__StreamDecoderWriteCallback)
(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame
, const FLAC__int32 *const buffer[], void *client_data)
Yes, client_data can point at anything. You the callee are responsible
to cast your pointer_to_anything to and from 'void*'
> For in...
2004 Sep 10
2
Storing FLAC in Matroska
Hello,
I'm looking into storing FLAC audio in Matroska and I have a few
questions.
1. Can I use libflac to extract the compressed frames?
Or will I need to write up a simple file parser?
2. What is required to decode the frames?
From the docs I understand that you need the FRAME and you may need the
METADATA_BLOCK.
Thanks,
Jory Stone
jcsston@toughguy.net
Matroska, the new,