mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add FLAC::Encoder::*::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
This commit is contained in:
@@ -165,6 +165,17 @@ namespace FLAC {
|
||||
return (bool)::FLAC__file_encoder_set_metadata(encoder_, metadata, num_blocks);
|
||||
}
|
||||
|
||||
bool File::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
|
||||
{
|
||||
FLAC__ASSERT(is_valid());
|
||||
::FLAC__StreamMetadata *m[num_blocks];
|
||||
for(unsigned i = 0; i < num_blocks; i++) {
|
||||
// we can get away with this since we know the encoder will only correct the is_last flags
|
||||
m[i] = const_cast< ::FLAC__StreamMetadata*>((::FLAC__StreamMetadata*)metadata[i]);
|
||||
}
|
||||
return (bool)::FLAC__file_encoder_set_metadata(encoder_, m, num_blocks);
|
||||
}
|
||||
|
||||
bool File::set_filename(const char *value)
|
||||
{
|
||||
FLAC__ASSERT(is_valid());
|
||||
|
||||
Reference in New Issue
Block a user