search for: flac__streamencoderinitstatus

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

2010 Feb 08
0
Use FLAC__stream_encoder_init_FILE instead of FLAC__stream_encoder_init_file
...( encoder, 16) ; > > FLAC__stream_encoder_set_sample_rate ( encoder, 44100 ); > > FLAC__stream_encoder_set_verify( encoder, FALSE ); > > 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 co...
2014 Sep 23
4
Disk fragmentation
...x environments but added buffering would definitely be a nice change for the Windows frontend. diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 6f46d78..bd95634 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -1288,6 +1288,8 @@ static FLAC__StreamEncoderInitStatus init_FILE_internal_( if(file == stdout) file = get_binary_stdout_(); /* just to be safe */ + setvbuf(file, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to help reduce disk fragmentation */ + encoder->private_->file = file; encoder->private_->prog...
2015 Dec 10
0
Windows file buffering
...bably don't know enough about the intricates of Win32, but why not prefer this for clarity: diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 203a271..0394c26 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -1330,7 +1330,8 @@ static FLAC__StreamEncoderInitStatus init_FILE_internal_( * Windows can suffer quite badly from disk fragmentation. This can be * reduced significantly by setting the output buffer size to be 10MB. */ - setvbuf(file, NULL, _IOFBF, 10*1024*1024); + if(file != stdout) + setvbuf(...
2011 Sep 28
0
FLAC::Encoder::Stream == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"
...der always returns an error enc.get_state() == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA" get_verify_decoder_state() == "FLAC__STREAM_DECODER_READ_FRAME" this is the code I have now /*****************************************************************************/ FLAC__StreamEncoderInitStatus init_status; TMyFlacEncoder enc; bool ok = true; unsigned int sample_size = 4; //2 * (16 / 8); 2 channels * (16 bits / 8) bytes unsigned int samples_per_sector = disc.getBytesPerSector(trackNum) / sample_size / 2 /*channels*/; unsi...
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...undef max -#endif -#define max(x,y) ((x)>(y)?(x):(y)) - /* Exact Rice codeword length calculation is off by default. The simple * (and fast) estimation (of how many bits a residual value will be * encoded with) in this encoder is very good, almost always yielding @@ -691,7 +682,7 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_( if(encoder->protected_->bits_per_sample < 16) { /* @@@ need some data about how to set this here w.r.t. blocksize and sample rate */ /* @@@ until then we'll make a guess */ - encoder->protected_->qlp_coeff_precision = max(FLAC__MIN_QLP_COEFF_PR...
2015 Dec 10
5
Windows file buffering
Erik de Castro Lopo wrote: > lvqcl, > > Would you be able to have alook at this one? I think its > Windows related: > > https://sourceforge.net/p/flac/feature-requests/114/ > The relevant changes are <http://git.xiph.org/?p=flac.git;a=commitdiff;h=6a6207b52a86b1d7980a5233e297c0fc948bed7d> and
2008 May 19
1
Memory leaks due to Metadata object vorbis comment API ???
...SIZE/*samples*/ * 2/*bytes_per_sample*/ * > 2/*channels*/]; /* we read the WAVE data into here */ > static FLAC__int32 pcm[READSIZE/*samples*/ * 2/*channels*/]; > > int main(int argc, char *argv[]) > { > FLAC__bool ok = true; > FLAC__StreamEncoder *encoder = 0; > FLAC__StreamEncoderInitStatus init_status; > FLAC__StreamMetadata *metadata[2]; > FLAC__StreamMetadata_VorbisComment_Entry entry; > FILE *fin; > unsigned sample_rate = 0; > unsigned channels = 0; > unsigned bps = 0; > > if(argc != 3) { > fprintf(stderr, "usage:...
2012 May 05
5
[PATCH] Optionally, allow distros to use openssl for MD5 verification
...encoder->private_->frame); +#if defined(HAVE_OPENSSL) + if(encoder->protected_->do_md5) { + EVP_MD_CTX_cleanup(&encoder->private_->md5context); + } +#endif free(encoder->private_); free(encoder->protected_); free(encoder); @@ -1035,8 +1042,15 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_( encoder->private_->streaminfo.data.stream_info.bits_per_sample = encoder->protected_->bits_per_sample; encoder->private_->streaminfo.data.stream_info.total_samples = encoder->protected_->total_samples_estimate; /* we will replace this later with th...
2018 Jul 10
9
[PATCH 0/7] PowerPC64 performance improvements
The following series adds initial vector support for PowerPC64. On POWER9, flac --best is about 3.3x faster. Amitay Isaacs (2): Add m4 macro to check for C __attribute__ features Check if compiler supports target attribute on ppc64 Anton Blanchard (5): configure.ac: Remove SPE detection code configure.ac: Add VSX enable/disable configure.ac: Fix FLAC__CPU_PPC on little endian, and add