add inherited get methods from stream decoder

This commit is contained in:
Josh Coalson 2002-06-04 05:54:56 +00:00
parent 2835f433b3
commit 8c2715fe30
2 changed files with 72 additions and 0 deletions

View File

@ -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_);

View File

@ -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());