search for: process_interleav

Displaying 9 results from an estimated 9 matches for "process_interleav".

Did you mean: process_interleaved
2005 Aug 01
1
Application Metadata
...ac_id); header_flac.set_data((FLAC__byte*)(header_str.begin()),header_str.size()); // set the metadata FLAC::Metadata::Prototype *metadata_sequence[] = { &header_flac }; enc.set_metadata(metadata_sequence,sizeof(metadata_sequence)/sizeof(metadata_sequence[0])); // and now i continue to init(), process_interleaved() and finish() But that kept giving me segmentation faults. So I tried the following, and it still gave me segmentation faults. FLAC__byte header_flac_id[4] = { 1, 2, 3, 4 }; FLAC__byte * header_byte = new FLAC__byte[header_str.size()]; copy(header_str.begin(),header_str.end(),header_by...
2006 Sep 06
2
Getting subframe type=verbatim on 16 bit files
...alue = flacCompressor.get_loose_mid_side_stereo(); */ // is this state okay? if (flacState != FLAC__STREAM_ENCODER_OK) return false; // bad settings for doing this compression so quit... // shoot the final data buffer to the encoder.... // we would have called process_interleaved if we had not created an array per channel above... if (!flacCompressor.DoProcess()) { flacState = flacCompressor.get_state(); return false; } flacState = flacCompressor.get_state(); flacCompressor.finish(); flacCompressor.Release(); ret...
2014 Aug 14
6
Encoder example for 24-bit files
...)(((FLAC__int16)(FLAC__int8)buffer[2*i+1] << 8) | (FLAC__int16)buffer[2*i]); + else if (bps == 24) + pcm[i] = (((FLAC__int32)(buffer[2*i+2] << 16)) |((FLAC__int32)(buffer[2*i+1] << 8)) | ((FLAC__int32)(buffer[2*i]))); } /* feed samples to encoder */ ok = FLAC__stream_encoder_process_interleaved(encoder, pcm, need); + if (!ok) { + fprintf(stderr, "encoding: process_interleaved %s\n", ok? "succeeded" : "FAILED"); + fprintf(stderr, " state: %s\n", FLAC__StreamEncoderStateString[FLAC__stream_encoder_get_state(encoder)]); + } } left -= need; }...
2006 May 11
2
C++ Set_Metadata Problem
I refer to a problem that appeared on the flac list last August that was either solved off-list or abandoned. (http://lists.xiph.org/pipermail/flac/2005-August/000468.html) The problem is with using the C++ encoder classes, particularly the FLAC::Encoder::File:set_metadata function. JC said that the developers version of how to add a simple metadata block looked right, but it did not work for
2006 Sep 06
0
Getting subframe type=verbatim on 16 bit files
...eo(); > */ > > // is this state okay? > if (flacState != FLAC__STREAM_ENCODER_OK) > return false; // bad settings for doing this compression so > quit... > > // shoot the final data buffer to the encoder.... > // we would have called process_interleaved if we had not created > an > array per channel above... > if (!flacCompressor.DoProcess()) > { > flacState = flacCompressor.get_state(); > return false; > } > > flacState = flacCompressor.get_state(); > flacCompressor.finish()...
2011 Sep 28
0
FLAC::Encoder::Stream == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"
...it_status = enc.init(); if( (!ok) || (init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK)) { return false; } /* read sectors from disc and feed to encoder */ for (unsigned int i = 0; i < trackLength; ++i) { disc.seekTrack(i, trackNum, false); ok = enc.process_interleaved((FLAC__int32*)disc.getBuffer(), samples_per_sector); FProgressCur++; if (!ok || !progressCallback()) { cout << "Flac error: " << enc.get_state().as_cstring() << endl; cout << "Flac verify state: " << enc.g...
2004 Nov 02
1
Basic Encoder Help
...frame of a CD samples = 588; // which contains 588 samples per channel per frame int j=0; for (int i=0; i<2352; i+=4) { // Converting unsigned char to signed long sample[j++] = buffer[i] + (buffer[i+1] << 8); sample[j++] = buffer[i+2] + (buffer[i+3] << 8); } flac.process_interleaved((const FLAC__int32*)&sample[0], samples); } void finish() { flac.finish(); } These are actually class members, but i've pulled them out to try and make it easier to spot any mistakes. I've tried to set it up to have an equivalent to quality level 5 on the command line flac utility....
2012 Apr 24
1
Writing seektable using libFLAC++
Hi! I've been using a little C++ program I've written to encode flac files. The program does this in the usual way (I think), by inheriting a class from FLAC::Encoder::File, and passing it chunks of raw samples through process_interleaved()... Anyway, the program works beautifully, and I've now decided to try and add some metadata to the encoded flacs. Eventually, there will be vorbis comments, but right now I'm just trying to add a seektable. From some code examples I've managed to get it working using the libFLAC C...
2006 Sep 07
2
Getting subframe type=verbatim on 16 bit files
...>> // is this state okay? >> if (flacState != FLAC__STREAM_ENCODER_OK) >> return false; // bad settings for doing this compression so >> quit... >> >> // shoot the final data buffer to the encoder.... >> // we would have called process_interleaved if we had not created >> an >> array per channel above... >> if (!flacCompressor.DoProcess()) >> { >> flacState = flacCompressor.get_state(); >> return false; >> } >> >> flacState = flacCompressor.get_state...