search for: flac__fram

Displaying 20 results from an estimated 25 matches for "flac__fram".

Did you mean: flac__frame
2004 Sep 10
2
getting framesize in client
I have few notes: It seems there is changed API in CVS again. So, what about adding function like unsigned FLAC__format_frame_size(const FLAC__Frame *frame) which returns size of the frame in bytes. This can be useful, for example, in xmms plugin to display current bitrate like vorbis plugin does. If 'PERFORMER' field is missing in vorbis comment, it would be nice to display 'ARTIST' field in plugins instead. In some libFLAC...
2011 May 24
3
Can a libFLAC encoder be initialize and called from inside a libFLAC decoder callback?
...coder, Buffer, Blocksize);". I have a version that decodes to a WAV file and then re-encodes the WAV file, but would like to avoid all that I/O. Regards. David FLAC__StreamDecoderWriteStatus FLACRecoder::StaticWriteCallback(const FLAC__StreamDecoder *FLACStreamDecoder, const FLAC__Frame *Frame, const FLAC__int32 *const Buffer[], void *ClientData) { return ((FLACRecoder *)(ClientData))->ClassWriteCallback(FLACStreamDecoder, Frame, Buffer); } FLAC__StreamDecoderWriteStatus FLACRecoder::ClassWriteCallback(const FLAC__StreamDecoder *WXUNUSED(FLACStreamDecoder), const FLA...
2004 Sep 10
2
Bits per Sample, Channel Count
Hi, these two values can be stored in the stream info metadata block as well as in the header of each frame. This leads to some questions. - Are these values supposed to change during playback, e.g. first comes a frame with 2 channels, then with four and the next switches the bit count from 16 to 8 and so on? - There are methods to retrieve these values from the stream decoder. Unfortunately
2014 Mar 08
2
16 bits FLAC file data to 32 bit float buffer for CPU processing
...try different approaches to convert FLAC 16 bits sound data to 32 bits float CPU buffer, but they give noise or sound with artefacts. I use Stream Decoder from FLAC C API and my write_callback is as follows : FLAC__StreamDecoderWriteStatus write_callback ( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void * client_data ) { size_t i; BYTE * ChannelDataBuffer; WORD * WORDChannelDataBuffer; DWORD * DWORDChannelDataBuffer;...
2004 Sep 10
2
Storing FLAC in Matroska
...d *bytes, void *client_data) { flacData *ourData = (flacData *)client_data; *bytes = fread((void *)buffer, 1, *bytes, ourData->inputFile); return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; }; FLAC__StreamDecoderWriteStatus flac_DecoderWriteCallback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data) { flacData *ourData = (flacData *)client_data; for(int current_sample = 0; current_sample < frame->header.blocksize; current_sample++) { for(int channel = 0; channel < frame->header.channels; channel++) { fwrite((...
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
2004 Sep 10
2
FLAC++ SeekableStream write_callback not being called?
...ually being called. Before I pepper my code with a bazillion trace statements, can anyone tell me if there is some obvious "trick-for-new-players" which I might have missed? My write_callback looks like: ::FLAC__StreamDecoderWriteStatus K3bFLACDecoder::Private::write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]) { int i; // Note that in canDecode we made sure that the input is only 16 bit stereo. int samples = frame->header.blocksize; internalBuffer = new QBuffer(); internalBuffer->open(IO_ReadWrite); for(i=0; i < samples; i++) { inter...
2005 Sep 30
2
Reg. FLAC decoding
...9;m using seekable_stream_decoder, And., this is my write_callback. I'm not getting the required output. The PCM i get is not the proper music. Am I doing something wrong here? FLAC__StreamDecoderWriteStatus AFLACStreamPlayer::StreamWriteCb ( const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data) { int Channels, BitsPerSample, BytesPerSample; RMstatus ret; AFLACStreamPlayer *pThis = (AFLACStreamPlayer *)client_data; pThis = (AFLACStreamPlayer *)client_data; /* Query the m_AppPlayerPipe and check for commands from...
2004 Sep 10
0
Bits per Sample, Channel Count
...LAC__stream_decoder_get_??? methods to retrieve the sample rate, > channel > count and sample size, and if not I just return the values stored in > the > stream info metadata block. I don't know if this will help, but when libFLAC calls your write callback, it will pass you a whole FLAC__Frame, from which you can get that info. or is that too late also? Josh __________________________________________________ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com
2004 Sep 10
0
getting framesize in client
--- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote: > I have few notes: > > It seems there is changed API in CVS again. So, what about adding > function like > unsigned FLAC__format_frame_size(const FLAC__Frame *frame) > which returns size of the frame in bytes. This can be useful, for > example, in xmms plugin to display current bitrate like vorbis plugin > does. What changed? I don't remember changing anything like that, maybe I checked something in by accident... Unfortunately accordin...
2004 Sep 10
0
getting framesize in client
...son wrote: > > --- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote: > > > I have few notes: > > > > > > It seems there is changed API in CVS again. So, what about adding > > > function like > > > unsigned FLAC__format_frame_size(const FLAC__Frame *frame) > > > which returns size of the frame in bytes. This can be useful, for > > > example, in xmms plugin to display current bitrate like vorbis > plugin > > > does. > > > > What changed? I don't remember changing anything like that, > > ma...
2004 Sep 10
0
FLAC++ SeekableStream write_callback not being called?
...code with a bazillion trace statements, can anyone > tell me > if there is some obvious "trick-for-new-players" which I might have > missed? > > My write_callback looks like: > > ::FLAC__StreamDecoderWriteStatus > K3bFLACDecoder::Private::write_callback(const ::FLAC__Frame *frame, > const > FLAC__int32 * const buffer[]) { > int i; > // Note that in canDecode we made sure that the input is only 16 > bit stereo. > int samples = frame->header.blocksize; > > internalBuffer = new QBuffer(); > internalBuffer->open(IO_ReadWrite)...
2013 Feb 10
0
Newbie question about those callbacks
...er 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 instance a pointer to a two-dimensional array? Yes. They can even be NULL...
2016 Jan 19
0
FLAC__stream_decoder_seek_absolute calling write callback
...r your response! Here's an example: #include <iostream> #include <FLAC++/all.h> int main(int argc, const char * argv[]) { class Decoder : public FLAC::Decoder::File { protected: virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]) override { std::cout << "write_callback called!" << std::endl; abort(); return FLAC__StreamDecoderWriteStatus::FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } vi...
2004 Sep 10
3
getting framesize in client
...at 12:39:52PM -0800, Josh Coalson wrote: > --- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote: > > I have few notes: > > > > It seems there is changed API in CVS again. So, what about adding > > function like > > unsigned FLAC__format_frame_size(const FLAC__Frame *frame) > > which returns size of the frame in bytes. This can be useful, for > > example, in xmms plugin to display current bitrate like vorbis plugin > > does. > > What changed? I don't remember changing anything like that, > maybe I checked something in by accid...
2005 Sep 30
0
Re: Reg. FLAC decoding
...is my write_callback. > I'm > not getting the required output. The PCM i get is not the proper > music. > Am I doing something wrong here? > > FLAC__StreamDecoderWriteStatus > AFLACStreamPlayer::StreamWriteCb ( > const FLAC__SeekableStreamDecoder *decoder, > const FLAC__Frame *frame, > const FLAC__int32 * const buffer[], > void *client_data) > { > int Channels, BitsPerSample, BytesPerSample; > RMstatus ret; > > AFLACStreamPlayer *pThis = (AFLACStreamPlayer *)client_data; > pThis = (AFLACStreamPlayer *)client_data; > > /* Que...
2014 Mar 08
0
16 bits FLAC file data to 32 bit float buffer for CPU processing
...this can be done efficiently using the Accelerate framework's vDSP_vflt16() and vDSP_vsdiv(). I'm sure there are comparable routines you could use if the above method is too slow. Stephen > FLAC__StreamDecoderWriteStatus write_callback ( const FLAC__StreamDecoder > *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], > void * client_data ) { > size_t i; > > BYTE * ChannelDataBuffer; > WORD * WORDChannelDataBuffer; > DWORD *...
2004 Sep 10
0
http streaming in the xmms plugin
...wrap_id3.h" #include "charset.h" + #include "http.h" #ifdef min #undef min *************** *** 68,73 **** --- 72,106 ---- DitherContext dither_context; } file_info_struct; + typedef FLAC__StreamDecoderWriteStatus (*WriteCallback) (const void *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data); + typedef void (*MetadataCallback) (const void *decoder, const FLAC__StreamMetadata *metadata, void *client_data); + typedef void (*ErrorCallback) (const void *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data); + + t...
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,
2013 Jul 01
2
About Decode Streaming
Sorry, I am newbie. Sample codes are from https://github.com/oneman/libflac/tree/master/examples/cpp. I used FLAC__stream_decoder_process_single function but it still gives exception. Maybe I could not control read callback, you're right. I will check it and write result in this thread. Thanks for help. 2013/7/1 Martijn van Beurden <mvanb1 at gmail.com> > I'll top-post this