diff --git a/src/libFLAC++/file_decoder.cc b/src/libFLAC++/file_decoder.cc index 21fa8021..86d15198 100644 --- a/src/libFLAC++/file_decoder.cc +++ b/src/libFLAC++/file_decoder.cc @@ -100,6 +100,36 @@ namespace FLAC { return (bool)::FLAC__file_decoder_get_md5_checking(decoder_); } + unsigned File::get_channels() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__file_decoder_get_channels(decoder_); + } + + ::FLAC__ChannelAssignment File::get_channel_assignment() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__file_decoder_get_channel_assignment(decoder_); + } + + unsigned File::get_bits_per_sample() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__file_decoder_get_bits_per_sample(decoder_); + } + + unsigned File::get_sample_rate() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__file_decoder_get_sample_rate(decoder_); + } + + unsigned File::get_blocksize() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__file_decoder_get_blocksize(decoder_); + } + File::State File::init() { FLAC__ASSERT(0 != decoder_); diff --git a/src/libFLAC++/seekable_stream_decoder.cc b/src/libFLAC++/seekable_stream_decoder.cc index 81744b37..cd1f529b 100644 --- a/src/libFLAC++/seekable_stream_decoder.cc +++ b/src/libFLAC++/seekable_stream_decoder.cc @@ -94,6 +94,36 @@ namespace FLAC { return (bool)::FLAC__seekable_stream_decoder_get_md5_checking(decoder_); } + unsigned SeekableStream::get_channels() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__seekable_stream_decoder_get_channels(decoder_); + } + + ::FLAC__ChannelAssignment SeekableStream::get_channel_assignment() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__seekable_stream_decoder_get_channel_assignment(decoder_); + } + + unsigned SeekableStream::get_bits_per_sample() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__seekable_stream_decoder_get_bits_per_sample(decoder_); + } + + unsigned SeekableStream::get_sample_rate() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__seekable_stream_decoder_get_sample_rate(decoder_); + } + + unsigned SeekableStream::get_blocksize() const + { + FLAC__ASSERT(is_valid()); + return ::FLAC__seekable_stream_decoder_get_blocksize(decoder_); + } + SeekableStream::State SeekableStream::init() { FLAC__ASSERT(is_valid()); @@ -115,6 +145,18 @@ namespace FLAC { return (bool)::FLAC__seekable_stream_decoder_finish(decoder_); } + bool SeekableStream::flush() + { + FLAC__ASSERT(is_valid()); + return (bool)::FLAC__seekable_stream_decoder_flush(decoder_); + } + + bool SeekableStream::reset() + { + FLAC__ASSERT(is_valid()); + return (bool)::FLAC__seekable_stream_decoder_reset(decoder_); + } + bool SeekableStream::process_whole_stream() { FLAC__ASSERT(is_valid());