Commit 3c2bdf87 authored by Josh Coalson's avatar Josh Coalson
Browse files

add ogg seekable stream and file encoder and decoder interfaces

parent e9b38b4c
......@@ -34,6 +34,8 @@
#include "export.h"
#include "OggFLAC/file_decoder.h"
#include "OggFLAC/seekable_stream_decoder.h"
#include "OggFLAC/stream_decoder.h"
// we only need this for the state abstraction really...
#include "FLAC++/decoder.h"
......@@ -53,11 +55,11 @@
* \ingroup oggflacpp
*
* \brief
* This module describes the decoder layers provided by libOggFLAC++.
* This module describes the three decoder layers provided by libOggFLAC++.
*
* The libOggFLAC++ decoder classes are object wrappers around their
* counterparts in libOggFLAC. Only the stream decoding layer in
* libOggFLAC provided here. The interface is very similar;
* counterparts in libOggFLAC. All three decoding layers available in
* libOggFLAC are also provided here. The interface is very similar;
* make sure to read the \link oggflac_decoder libOggFLAC decoder module \endlink.
*
* The only real difference here is that instead of passing in C function
......@@ -122,6 +124,10 @@ namespace OggFLAC {
unsigned get_sample_rate() const;
unsigned get_blocksize() const;
/** Initialize the instance; as with the C interface,
* init() should be called after construction and 'set'
* calls but before any of the 'process' calls.
*/
State init();
void finish();
......@@ -152,6 +158,187 @@ namespace OggFLAC {
/* \} */
// ============================================================
//
// Equivalent: OggFLAC__SeekableStreamDecoder
//
// ============================================================
/** \defgroup oggflacpp_seekable_stream_decoder OggFLAC++/decoder.h: seekable stream decoder class
* \ingroup oggflacpp_decoder
*
* \brief
* This class wraps the ::OggFLAC__SeekableStreamDecoder.
*
* See the \link oggflac_seekable_stream_decoder libOggFLAC seekable stream decoder module \endlink.
*
* \{
*/
/** This class wraps the ::OggFLAC__SeekableStreamDecoder.
*/
class OggFLACPP_API SeekableStream {
public:
class OggFLACPP_API State {
public:
inline State(::OggFLAC__SeekableStreamDecoderState state): state_(state) { }
inline operator ::OggFLAC__SeekableStreamDecoderState() const { return state_; }
inline const char *as_cstring() const { return ::OggFLAC__SeekableStreamDecoderStateString[state_]; }
inline const char *resolved_as_cstring(const SeekableStream &decoder) const { return ::OggFLAC__seekable_stream_decoder_get_resolved_state_string(decoder.decoder_); }
protected:
::OggFLAC__SeekableStreamDecoderState state_;
};
SeekableStream();
virtual ~SeekableStream();
bool is_valid() const;
inline operator bool() const { return is_valid(); }
bool set_serial_number(long value);
bool set_md5_checking(bool value);
bool set_metadata_respond(::FLAC__MetadataType type);
bool set_metadata_respond_application(const FLAC__byte id[4]);
bool set_metadata_respond_all();
bool set_metadata_ignore(::FLAC__MetadataType type);
bool set_metadata_ignore_application(const FLAC__byte id[4]);
bool set_metadata_ignore_all();
State get_state() const;
FLAC::Decoder::SeekableStream::State get_FLAC_seekable_stream_decoder_state() const;
FLAC::Decoder::Stream::State get_FLAC_stream_decoder_state() const;
bool get_md5_checking() const;
unsigned get_channels() const;
::FLAC__ChannelAssignment get_channel_assignment() const;
unsigned get_bits_per_sample() const;
unsigned get_sample_rate() const;
unsigned get_blocksize() const;
State init();
bool finish();
bool flush();
bool reset();
bool process_single();
bool process_until_end_of_metadata();
bool process_until_end_of_stream();
bool seek_absolute(FLAC__uint64 sample);
protected:
virtual ::FLAC__SeekableStreamDecoderReadStatus read_callback(FLAC__byte buffer[], unsigned *bytes) = 0;
virtual ::FLAC__SeekableStreamDecoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset) = 0;
virtual ::FLAC__SeekableStreamDecoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset) = 0;
virtual ::FLAC__SeekableStreamDecoderLengthStatus length_callback(FLAC__uint64 *stream_length) = 0;
virtual bool eof_callback() = 0;
virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]) = 0;
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata) = 0;
virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
::OggFLAC__SeekableStreamDecoder *decoder_;
private:
static ::FLAC__SeekableStreamDecoderReadStatus read_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
static ::FLAC__SeekableStreamDecoderSeekStatus seek_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data);
static ::FLAC__SeekableStreamDecoderTellStatus tell_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
static ::FLAC__SeekableStreamDecoderLengthStatus length_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data);
static FLAC__bool eof_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, void *client_data);
static ::FLAC__StreamDecoderWriteStatus write_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
static void metadata_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *client_data);
static void error_callback_(const ::OggFLAC__SeekableStreamDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *client_data);
// Private and undefined so you can't use them:
SeekableStream(const SeekableStream &);
void operator=(const SeekableStream &);
};
/* \} */
// ============================================================
//
// Equivalent: OggFLAC__FileDecoder
//
// ============================================================
/** \defgroup oggflacpp_file_decoder OggFLAC++/decoder.h: file decoder class
* \ingroup oggflacpp_decoder
*
* \brief
* This class wraps the ::OggFLAC__FileDecoder.
*
* See the \link oggflac_file_decoder libOggFLAC file decoder module \endlink.
*
* \{
*/
/** This class wraps the ::OggFLAC__FileDecoder.
*/
class OggFLACPP_API File {
public:
class OggFLACPP_API State {
public:
inline State(::OggFLAC__FileDecoderState state): state_(state) { }
inline operator ::OggFLAC__FileDecoderState() const { return state_; }
inline const char *as_cstring() const { return ::OggFLAC__FileDecoderStateString[state_]; }
inline const char *resolved_as_cstring(const File &decoder) const { return ::OggFLAC__file_decoder_get_resolved_state_string(decoder.decoder_); }
protected:
::OggFLAC__FileDecoderState state_;
};
File();
virtual ~File();
bool is_valid() const;
inline operator bool() const { return is_valid(); }
bool set_serial_number(long value);
bool set_md5_checking(bool value);
bool set_filename(const char *value); //!< 'value' may not be \c NULL; use "-" for stdin
bool set_metadata_respond(::FLAC__MetadataType type);
bool set_metadata_respond_application(const FLAC__byte id[4]);
bool set_metadata_respond_all();
bool set_metadata_ignore(::FLAC__MetadataType type);
bool set_metadata_ignore_application(const FLAC__byte id[4]);
bool set_metadata_ignore_all();
State get_state() const;
FLAC::Decoder::File::State get_FLAC_file_decoder_state() const;
FLAC::Decoder::SeekableStream::State get_FLAC_seekable_stream_decoder_state() const;
FLAC::Decoder::Stream::State get_FLAC_stream_decoder_state() const;
bool get_md5_checking() const;
unsigned get_channels() const;
::FLAC__ChannelAssignment get_channel_assignment() const;
unsigned get_bits_per_sample() const;
unsigned get_sample_rate() const;
unsigned get_blocksize() const;
State init();
bool finish();
bool process_single();
bool process_until_end_of_metadata();
bool process_until_end_of_file();
bool seek_absolute(FLAC__uint64 sample);
protected:
virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]) = 0;
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata) = 0;
virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
::OggFLAC__FileDecoder *decoder_;
private:
static ::FLAC__StreamDecoderWriteStatus write_callback_(const ::OggFLAC__FileDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
static void metadata_callback_(const ::OggFLAC__FileDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *client_data);
static void error_callback_(const ::OggFLAC__FileDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *client_data);
// Private and undefined so you can't use them:
File(const File &);
void operator=(const File &);
};
/* \} */
};
};
......
......@@ -34,6 +34,8 @@
#include "export.h"
#include "OggFLAC/file_encoder.h"
#include "OggFLAC/seekable_stream_encoder.h"
#include "OggFLAC/stream_encoder.h"
#include "decoder.h"
// we only need these for the state abstractions really...
......@@ -55,11 +57,11 @@
* \ingroup oggflacpp
*
* \brief
* This module describes the encoder layers provided by libOggFLAC++.
* This module describes the three encoder layers provided by libOggFLAC++.
*
* The libOggFLAC++ encoder classes are object wrappers around their
* counterparts in libOggFLAC. Only the stream encoding layer in
* libOggFLAC is provided here. The interface is very similar;
* counterparts in libOggFLAC. All three encoding layers available in
* libOggFLAC are also provided here. The interface is very similar;
* make sure to read the \link oggflac_encoder libOggFLAC encoder module \endlink.
*
* The only real difference here is that instead of passing in C function
......@@ -158,12 +160,12 @@ namespace OggFLAC {
bool process_interleaved(const FLAC__int32 buffer[], unsigned samples);
protected:
virtual ::FLAC__StreamEncoderWriteStatus write_callback(const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame) = 0;
virtual void metadata_callback(const FLAC__StreamMetadata *metadata) = 0;
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata) = 0;
::OggFLAC__StreamEncoder *encoder_;
private:
static ::FLAC__StreamEncoderWriteStatus write_callback_(const ::OggFLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data);
static void metadata_callback_(const ::OggFLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data);
static void metadata_callback_(const ::OggFLAC__StreamEncoder *encoder, const ::FLAC__StreamMetadata *metadata, void *client_data);
// Private and undefined so you can't use them:
Stream(const Stream &);
......@@ -172,6 +174,200 @@ namespace OggFLAC {
/* \} */
/** \defgroup oggflacpp_seekable_stream_encoder OggFLAC++/encoder.h: seekable stream encoder class
* \ingroup oggflacpp_encoder
*
* \brief
* This class wraps the ::OggFLAC__SeekableStreamEncoder.
*
* See the \link oggflac_seekable_stream_encoder libOggFLAC seekable stream encoder module \endlink.
*
* \{
*/
/** This class wraps the ::OggFLAC__SeekableStreamEncoder.
*/
class OggFLACPP_API SeekableStream {
public:
class OggFLACPP_API State {
public:
inline State(::OggFLAC__SeekableStreamEncoderState state): state_(state) { }
inline operator ::OggFLAC__SeekableStreamEncoderState() const { return state_; }
inline const char *as_cstring() const { return ::OggFLAC__SeekableStreamEncoderStateString[state_]; }
inline const char *resolved_as_cstring(const SeekableStream &encoder) const { return ::OggFLAC__seekable_stream_encoder_get_resolved_state_string(encoder.encoder_); }
protected:
::OggFLAC__SeekableStreamEncoderState state_;
};
SeekableStream();
virtual ~SeekableStream();
bool is_valid() const;
inline operator bool() const { return is_valid(); }
bool set_serial_number(long value);
bool set_verify(bool value);
bool set_streamable_subset(bool value);
bool set_do_mid_side_stereo(bool value);
bool set_loose_mid_side_stereo(bool value);
bool set_channels(unsigned value);
bool set_bits_per_sample(unsigned value);
bool set_sample_rate(unsigned value);
bool set_blocksize(unsigned value);
bool set_max_lpc_order(unsigned value);
bool set_qlp_coeff_precision(unsigned value);
bool set_do_qlp_coeff_prec_search(bool value);
bool set_do_escape_coding(bool value);
bool set_do_exhaustive_model_search(bool value);
bool set_min_residual_partition_order(unsigned value);
bool set_max_residual_partition_order(unsigned value);
bool set_rice_parameter_search_dist(unsigned value);
bool set_total_samples_estimate(FLAC__uint64 value);
bool set_metadata(::FLAC__StreamMetadata **metadata, unsigned num_blocks);
State get_state() const;
FLAC::Encoder::SeekableStream::State get_FLAC_seekable_stream_encoder_state() const;
FLAC::Encoder::Stream::State get_FLAC_stream_encoder_state() const;
FLAC::Decoder::Stream::State get_verify_decoder_state() const;
void get_verify_decoder_error_stats(FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got);
bool get_verify() const;
bool get_streamable_subset() const;
bool get_do_mid_side_stereo() const;
bool get_loose_mid_side_stereo() const;
unsigned get_channels() const;
unsigned get_bits_per_sample() const;
unsigned get_sample_rate() const;
unsigned get_blocksize() const;
unsigned get_max_lpc_order() const;
unsigned get_qlp_coeff_precision() const;
bool get_do_qlp_coeff_prec_search() const;
bool get_do_escape_coding() const;
bool get_do_exhaustive_model_search() const;
unsigned get_min_residual_partition_order() const;
unsigned get_max_residual_partition_order() const;
unsigned get_rice_parameter_search_dist() const;
FLAC__uint64 get_total_samples_estimate() const;
State init();
void finish();
bool process(const FLAC__int32 * const buffer[], unsigned samples);
bool process_interleaved(const FLAC__int32 buffer[], unsigned samples);
protected:
virtual ::FLAC__SeekableStreamEncoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset) = 0;
virtual ::FLAC__SeekableStreamEncoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset) = 0;
virtual ::FLAC__StreamEncoderWriteStatus write_callback(const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame) = 0;
::OggFLAC__SeekableStreamEncoder *encoder_;
private:
static ::FLAC__SeekableStreamEncoderSeekStatus seek_callback_(const OggFLAC__SeekableStreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data);
static ::FLAC__SeekableStreamEncoderTellStatus tell_callback_(const OggFLAC__SeekableStreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
static ::FLAC__StreamEncoderWriteStatus write_callback_(const OggFLAC__SeekableStreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data);
// Private and undefined so you can't use them:
SeekableStream(const SeekableStream &);
void operator=(const SeekableStream &);
};
/* \} */
/** \defgroup oggflacpp_file_encoder OggFLAC++/encoder.h: file encoder class
* \ingroup oggflacpp_encoder
*
* \brief
* This class wraps the ::OggFLAC__FileEncoder.
*
* See the \link oggflac_file_encoder libOggFLAC file encoder module \endlink.
*
* \{
*/
/** This class wraps the ::OggFLAC__FileEncoder.
*/
class OggFLACPP_API File {
public:
class OggFLACPP_API State {
public:
inline State(::OggFLAC__FileEncoderState state): state_(state) { }
inline operator ::OggFLAC__FileEncoderState() const { return state_; }
inline const char *as_cstring() const { return ::OggFLAC__FileEncoderStateString[state_]; }
inline const char *resolved_as_cstring(const File &encoder) const { return ::OggFLAC__file_encoder_get_resolved_state_string(encoder.encoder_); }
protected:
::OggFLAC__FileEncoderState state_;
};
File();
virtual ~File();
bool is_valid() const;
inline operator bool() const { return is_valid(); }
bool set_serial_number(long value);
bool set_verify(bool value);
bool set_streamable_subset(bool value);
bool set_do_mid_side_stereo(bool value);
bool set_loose_mid_side_stereo(bool value);
bool set_channels(unsigned value);
bool set_bits_per_sample(unsigned value);
bool set_sample_rate(unsigned value);
bool set_blocksize(unsigned value);
bool set_max_lpc_order(unsigned value);
bool set_qlp_coeff_precision(unsigned value);
bool set_do_qlp_coeff_prec_search(bool value);
bool set_do_escape_coding(bool value);
bool set_do_exhaustive_model_search(bool value);
bool set_min_residual_partition_order(unsigned value);
bool set_max_residual_partition_order(unsigned value);
bool set_rice_parameter_search_dist(unsigned value);
bool set_total_samples_estimate(FLAC__uint64 value);
bool set_metadata(::FLAC__StreamMetadata **metadata, unsigned num_blocks);
bool set_filename(const char *value);
State get_state() const;
SeekableStream::State get_seekable_stream_encoder_state() const;
FLAC::Encoder::SeekableStream::State get_FLAC_seekable_stream_encoder_state() const;
FLAC::Encoder::Stream::State get_FLAC_stream_encoder_state() const;
FLAC::Decoder::Stream::State get_verify_decoder_state() const;
void get_verify_decoder_error_stats(FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got);
bool get_verify() const;
bool get_streamable_subset() const;
bool get_do_mid_side_stereo() const;
bool get_loose_mid_side_stereo() const;
unsigned get_channels() const;
unsigned get_bits_per_sample() const;
unsigned get_sample_rate() const;
unsigned get_blocksize() const;
unsigned get_max_lpc_order() const;
unsigned get_qlp_coeff_precision() const;
bool get_do_qlp_coeff_prec_search() const;
bool get_do_escape_coding() const;
bool get_do_exhaustive_model_search() const;
unsigned get_min_residual_partition_order() const;
unsigned get_max_residual_partition_order() const;
unsigned get_rice_parameter_search_dist() const;
FLAC__uint64 get_total_samples_estimate() const;
State init();
void finish();
bool process(const FLAC__int32 * const buffer[], unsigned samples);
bool process_interleaved(const FLAC__int32 buffer[], unsigned samples);
protected:
virtual void progress_callback(FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate);
::OggFLAC__FileEncoder *encoder_;
private:
static void progress_callback_(const ::OggFLAC__FileEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data);
// Private and undefined so you can't use them:
File(const Stream &);
void operator=(const Stream &);
};
/* \} */
};
};
......
......@@ -36,5 +36,9 @@ oggflaccincludedir = $(includedir)/OggFLAC
oggflaccinclude_HEADERS = \
all.h \
export.h \
file_decoder.h \
file_encoder.h \
seekable_stream_decoder.h \
seekable_stream_encoder.h \
stream_decoder.h \
stream_encoder.h
......@@ -38,6 +38,10 @@
#include "export.h"
#include "file_decoder.h"
#include "file_encoder.h"
#include "seekable_stream_decoder.h"
#include "seekable_stream_encoder.h"
#include "stream_decoder.h"
#include "stream_encoder.h"
......
This diff is collapsed.
This diff is collapsed.
......@@ -45,5 +45,9 @@ libOggFLAC___la_LDFLAGS = -version-info 0:4:0
libOggFLAC___la_LIBADD = ../libOggFLAC/libOggFLAC.la
libOggFLAC___la_SOURCES = \
file_decoder.cpp \
file_encoder.cpp \
seekable_stream_decoder.cpp \
seekable_stream_encoder.cpp \
stream_decoder.cpp \
stream_encoder.cpp
......@@ -38,6 +38,10 @@ LIB_NAME = libOggFLAC++
INCLUDES = -I$(topdir)/include
SRCS_CPP = \
file_decoder.cpp \
file_encoder.cpp \
seekable_stream_decoder.cpp \
seekable_stream_encoder.cpp \
stream_decoder.cpp \
stream_encoder.cpp
......
/* libOggFLAC++ - Free Lossless Audio Codec + Ogg library
* Copyright (C) 2002,2003 Josh Coalson
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Xiph.org Foundation nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "OggFLAC++/decoder.h"
#include "FLAC/assert.h"
namespace OggFLAC {
namespace Decoder {
File::File():
decoder_(::OggFLAC__file_decoder_new())
{ }
File::~File()
{
if(0 != decoder_) {
(void) ::OggFLAC__file_decoder_finish(decoder_);
::OggFLAC__file_decoder_delete(decoder_);
}
}
bool File::is_valid() const
{
return 0 != decoder_;
}
bool File::set_serial_number(long value)
{
FLAC__ASSERT(is_valid());
return (bool)::OggFLAC__file_decoder_set_serial_number(decoder_, value);
}
bool File::set_md5_checking(bool value)
{
FLAC__ASSERT(0 != decoder_);
return (bool)::OggFLAC__file_decoder_set_md5_checking(decoder_, value);
}
bool File::set_filename(const char *value)
{
FLAC__ASSERT(0 != decoder_);
return (bool)::OggFLAC__file_decoder_set_filename(decoder_, value);
}
bool File::set_metadata_respond(::FLAC__MetadataType type)
{
FLAC__ASSERT(0 != decoder_);
return (bool)::OggFLAC__file_decoder_set_metadata_respond(decoder_, type);
}
bool File::set_metadata_respond_application(const FLAC__byte id[4])
{
FLAC__ASSERT(0 != decoder_);
return (bool)::OggFLAC__file_decoder_set_metadata_respond_application(decoder_, id);
}
bool File::set_metadata_respond_all()
{
FLAC__ASSERT(0 != decoder_);
return (bool)::OggFLAC__file_decoder_set_metadata_respond_all(decoder_);
}
bool File::set_metadata_ignore(::FLAC__MetadataType type)
{
FLAC__ASSERT(0 != decoder_);
return (bool)::OggFLAC__file_decoder_set_metadata_ignore(decoder_, type);
}
bool File::set_metadata_ignore_application(const FLAC__byte id[4])