search for: flac__stream_encoder_new

Displaying 16 results from an estimated 16 matches for "flac__stream_encoder_new".

2010 Jul 16
0
libFLAC_static / CMake
Hello, trying to compile a project with MSVC++ and libFLAC_static.lib I have a CMakeLists.txt with this: set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} libFLAC_static.lib) optional(HAVE_FLAC FLAC/all.h libFLAC_static FLAC__stream_encoder_new flac) optional(STATIC_FLAC FLAC/all.h libFLAC_static FLAC__stream_encoder_new flac) CMake answer (the *.lib is always found): Looking for FLAC__stream_encoder_new in libFLAC_static - not found If I put "libFLAC.lib" instead of "libFLAC_static.lib" it is found. Any idea? Tha...
2007 Mar 13
2
flac fails encoding 88.2
I do the following to init flac: encoder = FLAC__stream_encoder_new(); e = FLAC__stream_encoder_set_do_mid_side_stereo (encoder, numChannels == 2); e = FLAC__stream_encoder_set_loose_mid_side_stereo (encoder, numChannels == 2); e = FLAC__stream_encoder_set_channels (encoder, numChannels); e = FLAC__stream_encoder_set_bits_per_sample...
2006 Jun 17
3
Assistance with an encoding plugin
...t of mine which uses paranoia for the raw audio extraction. My basic setup which follows gets me oddly high pitched audio with lots of noise (although the music IS somewhat recognizable). #include <FLAC/stream_encoder.h> FLAC__StreamEncoder *encoder; FILE *output_file_descriptor; encoder = FLAC__stream_encoder_new(); FLAC__stream_encoder_set_write_callback(plugin->encoder, write_callback); FLAC__stream_encoder_set_metadata_callback(plugin->encoder, metadata_callback); FLAC__stream_encoder_set_client_data(plugin->encoder, output_file_descriptor); FLAC__stream_encoder_init(plugin->encoder); while...
2006 Dec 12
1
Setting compression level
Hi. I'm have a little problem with setting compression level since 1.1.3 releases. I'm using : FE = FLAC__stream_encoder_new(); FLAC__stream_encoder_set_channels( FE, channels); FLAC__stream_encoder_set_bits_per_sample( FE, bitsample); FLAC__stream_encoder_set_sample_rate( FE, samplerate); unsigned int level; if (formatdatalen>0) level = *(char*)(formatdata); else level = 7; if (level>=0 && level<=8)...
2010 Feb 08
0
Use FLAC__stream_encoder_init_FILE instead of FLAC__stream_encoder_init_file
Hi, I use the libflac to encoder wav files to flac, my code: FLAC__StreamEncoder *encoder = 0; > > >> if((encoder = FLAC__stream_encoder_new()) == NULL) > > { > > printf(_T("ERROR: allocating encoder")); > > return; > > } > > >> FLAC__stream_encoder_set_channels ( encoder, 2 ); > > FLAC__stream_encoder_set_bits_per_sample ( encoder, 16) ; > > FLAC__stream_encoder_set_sample_rate...
2010 Jun 21
0
Flac in Sox
..."libFLAC_static.lib" without problems. Then I changed "CMakeLists.txt": I added this line: set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} libFLAC_static.lib) and now Have_Flac is found. But there is still a problem with this line: optional(HAVE_FLAC FLAC/all.h FLAC FLAC__stream_encoder_new flac) because "FLAC__stream_encoder_new" is not found (cmake)! Should this be in an other library or...? Thanks a lot! Regards Thomas
2005 May 25
0
[PATCH] Fix fuction prototypes/definitions with void argument
...a_CueSheet_Track)); } --- src/libFLAC/stream_encoder.c-dist 2005-05-25 16:07:23.000000000 +0200 +++ src/libFLAC/stream_encoder.c 2005-05-25 16:07:27.000000000 +0200 @@ -454,7 +454,7 @@ FLAC_API const char * const FLAC__Stream * Class constructor/destructor * */ -FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new() +FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void) { FLAC__StreamEncoder *encoder; unsigned i; --- src/libFLAC/stream_decoder.c-dist 2005-05-25 16:07:23.000000000 +0200 +++ src/libFLAC/stream_decoder.c 2005-05-25 16:07:27.000000000 +0200 @@ -180,7 +180,7 @@ FLAC_API const char * c...
2014 Aug 14
1
Encoder example for 24-bit files
...ls = ((unsigned)buffer[23] << 8) | buffer[22]; + bps = ((unsigned)buffer[35] << 8) | buffer[34]; + total_samples = (((((((unsigned)buffer[43] << 8) | buffer[42]) << 8) | buffer[41]) << 8) | buffer[40]) / (channels * bps/8); /* allocate the encoder */ if((encoder = FLAC__stream_encoder_new()) == NULL) { @@ -89,7 +95,12 @@ int main(int argc, char *argv[]) return 1; } - ok &= FLAC__stream_encoder_set_verify(encoder, true); + if (bps == 16) { + /* TODO: Understand why verify doesn't work for 24bps - fails with + * FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA when ca...
2018 Feb 04
1
libFLAC optimizations request
...lac uses the standard libFLAC and creates files without the Vorbis overhead. My quick review of the source seemed to indicate that calling FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT) will create the comment, but I assumed that you could pass in NULL. I mistakenly thought that was FLAC__stream_encoder_new(). There is a comment saying that the Ogg FLAC mapping requires a VORBIS_COMMENT, but that doesn’t necessarily mean that standard FLAC also requires the Vorbis comment. Looking around metaflac sources, I see FLAC__metadata_iterator_delete_block(iterator, options->use_padding), which might be t...
2007 Mar 14
0
flac fails encoding 88.2
--- Roland Rabien <Roland.Rabien@mackie.com> wrote: > I do the following to init flac: > > encoder = FLAC__stream_encoder_new(); > > e = FLAC__stream_encoder_set_do_mid_side_stereo (encoder, > numChannels == 2); > e = FLAC__stream_encoder_set_loose_mid_side_stereo (encoder, > numChannels == 2); > e = FLAC__stream_encoder_set_channels (encoder, numChannels); > e = FLAC_...
2006 Jun 19
0
Assistance with an encoding plugin
...e raw audio extraction. My >basic setup which follows gets me oddly high pitched audio with lots of >noise (although the music IS somewhat recognizable). > >#include <FLAC/stream_encoder.h> > >FLAC__StreamEncoder *encoder; >FILE *output_file_descriptor; > >encoder = FLAC__stream_encoder_new(); > >FLAC__stream_encoder_set_write_callback(plugin->encoder, write_callback); >FLAC__stream_encoder_set_metadata_callback(plugin->encoder, >metadata_callback); >FLAC__stream_encoder_set_client_data(plugin->encoder, >output_file_descriptor); >FLAC__stream_encoder_init...
2011 Aug 11
1
Memory leak
...s, rerun with: -v ==30495== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 20 from 8) In this example I used FLAC::Encoder::File, but the same thing happens with FLAC::Encoder::Stream and, from reading the source, with the C API, as long as one does not call FLAC__stream_encoder_delete() and FLAC__stream_encoder_new() between finish()'ing and init()'ing a stream. The fix will have to be in init_stream_internal_() in src/libFLAC/stream_encoder.c:1007 (in libFLAC-1.2.1), where it should checked whether encoder->private_->verify.decoder == NULL before calling FLAC__stream_decoder_new(). If a decode...
2008 May 19
1
Memory leaks due to Metadata object vorbis comment API ???
...printf("sampleRate:%d\n", sample_rate); > channels = 2; > bps = 16; > total_samples = (((((((unsigned)buffer[43] << 8) | buffer[42]) << 8) | > buffer[41]) << 8) | buffer[40]) / 4; > > /* allocate the encoder */ > if((encoder = FLAC__stream_encoder_new()) == NULL) { > fprintf(stderr, "ERROR: allocating encoder\n"); > fclose(fin); > return 1; > } > > ok &= FLAC__stream_encoder_set_verify(encoder, true); > ok &= FLAC__stream_encoder_set_compression_level(encoder, 5); >...
2014 Aug 14
6
Encoder example for 24-bit files
Hi, In the last days I've been taking as reference the example found in examples/c/encode/file/main.c. With it I've been able to encode a 2ch, 16 bps, 44100 sample rate input WAV file to a FLAC file. Now I've been trying to modify this example to encode a 2ch, 24 bps, 96000 sample rate WAV file. I have to say I'm a bit lost on how I should read the input file in this case, and
2018 Feb 04
2
libFLAC optimizations request
Correction, the flac command-line does create a 40-byte Vorbis comment by default. I just never noticed it before. I’ve been using —no-padding all these years for minimal file sizes without realizing that I could save another 40 bytes. Anyway, since metaflac can remove the Vorbis comment using the standard library, then you should be able to create a solution without modifying libFLAC. Brian
2012 May 05
5
[PATCH] Optionally, allow distros to use openssl for MD5 verification
...5Init(&decoder->private_->md5context); +#endif return true; } diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 7e102a5..787366e 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -570,7 +570,9 @@ FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void) FLAC__format_entropy_coding_method_partitioned_rice_contents_init(&encoder->private_->partitioned_rice_contents_extra[i]); encoder->protected_->state = FLAC__STREAM_ENCODER_UNINITIALIZED; - +#if defined(HAVE_OPENSSL) + if(encoder->protected_->do_md5) EVP_MD_CTX...