Displaying 4 results from an estimated 4 matches for "flac__stream_encoder_init_status_ok".
2010 Feb 08
0
Use FLAC__stream_encoder_init_FILE instead of FLAC__stream_encoder_init_file
...FLAC__stream_encoder_set_blocksize( encoder, 0 );
>
> FLAC__stream_encoder_set_compression_level( encoder, 5);
>
>
>>
>> FLAC__StreamEncoderInitStatus InitStatus;
>
> InitStatus=FLAC__stream_encoder_init_file( encoder, FullFileName, NULL,
>> NULL );
>
> if(FLAC__STREAM_ENCODER_INIT_STATUS_OK != InitStatus )
>
> {
>
> printf(_T("Error Code: %d"),(int)InitStatus);
>
> }
>
>
The code worked for years, recently I made a unicode version of the app, it
works with the "normal" filename, but not with the filename which contains
some...
2011 Sep 28
0
FLAC::Encoder::Stream == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"
...// 44.100 Hz
ok &= enc.set_compression_level((FCompressionStrength > 8) ? 8 :
FCompressionStrength);
ok &= enc.set_total_samples_estimate(total_samples);
enc.setOutFile(&file);
/* initialize encoder */
init_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);
FProgressC...
2011 Aug 11
1
Memory leak
...LAC::Encoder::File
{
public:
inline bool dataStart(std::string const &filename);
inline bool dataUpdate(char const *const data, int len);
inline bool dataFinish();
};
inline bool FlacWriter::dataStart(std::string const &filename)
{
if (set_verify(true) && init(filename) == FLAC__STREAM_ENCODER_INIT_STATUS_OK)
return true;
return false;
}
inline bool FlacWriter::dataUpdate(char const *const data, int len)
{
return true; // handle data here and call process(_interleaved)
}
inline bool FlacWriter::dataFinish()
{
if (!finish())
return false;
return true;
}
int main(int argc, char *argv[...
2008 May 19
1
Memory leaks due to Metadata object vorbis comment API ???
...t_metadata(encoder, metadata, 2))
> return FLAC__STREAM_ENCODER_CLIENT_ERROR;
>
> /* initialize encoder */
> if(ok) {
> init_status = FLAC__stream_encoder_init_file(encoder, argv[2],
> progress_callback, /*client_data=*/NULL);
> if(init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
> fprintf(stderr, "ERROR: initializing encoder: %s\n",
> FLAC__StreamEncoderInitStatusString[init_status]);
> ok = false;
> }
> }
>
> /* read blocks of samples from WAVE file and feed to encoder */
> if(ok) {
>...