rename (FLAC__format_is_valid_sample_rate() to FLAC__format_sample_rate_is_valid()
[flac.git] / src / libFLAC++ / seekable_stream_decoder.cc
index 2c75f25..85de046 100644 (file)
@@ -43,43 +43,43 @@ namespace FLAC {
                bool SeekableStream::set_md5_checking(bool value)
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_md5_checking(decoder_, value);
+                       return (bool)::FLAC__seekable_stream_decoder_set_md5_checking(decoder_, value);
                }
 
-               bool SeekableStream::set_metadata_respond(::FLAC__MetaDataType type)
+               bool SeekableStream::set_metadata_respond(::FLAC__MetadataType type)
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_metadata_respond(decoder_, type);
+                       return (bool)::FLAC__seekable_stream_decoder_set_metadata_respond(decoder_, type);
                }
 
                bool SeekableStream::set_metadata_respond_application(const FLAC__byte id[4])
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_metadata_respond_application(decoder_, id);
+                       return (bool)::FLAC__seekable_stream_decoder_set_metadata_respond_application(decoder_, id);
                }
 
                bool SeekableStream::set_metadata_respond_all()
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_metadata_respond_all(decoder_);
+                       return (bool)::FLAC__seekable_stream_decoder_set_metadata_respond_all(decoder_);
                }
 
-               bool SeekableStream::set_metadata_ignore(::FLAC__MetaDataType type)
+               bool SeekableStream::set_metadata_ignore(::FLAC__MetadataType type)
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_metadata_ignore(decoder_, type);
+                       return (bool)::FLAC__seekable_stream_decoder_set_metadata_ignore(decoder_, type);
                }
 
                bool SeekableStream::set_metadata_ignore_application(const FLAC__byte id[4])
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_metadata_ignore_application(decoder_, id);
+                       return (bool)::FLAC__seekable_stream_decoder_set_metadata_ignore_application(decoder_, id);
                }
 
                bool SeekableStream::set_metadata_ignore_all()
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_set_metadata_ignore_all(decoder_);
+                       return (bool)::FLAC__seekable_stream_decoder_set_metadata_ignore_all(decoder_);
                }
 
                SeekableStream::State SeekableStream::get_state() const
@@ -91,7 +91,37 @@ namespace FLAC {
                bool SeekableStream::get_md5_checking() const
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_get_md5_checking(decoder_);
+                       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()
@@ -112,37 +142,49 @@ namespace FLAC {
                bool SeekableStream::finish()
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_finish(decoder_);
+                       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());
-                       return ::FLAC__seekable_stream_decoder_process_whole_stream(decoder_);
+                       return (bool)::FLAC__seekable_stream_decoder_process_whole_stream(decoder_);
                }
 
                bool SeekableStream::process_metadata()
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_process_metadata(decoder_);
+                       return (bool)::FLAC__seekable_stream_decoder_process_metadata(decoder_);
                }
 
                bool SeekableStream::process_one_frame()
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_process_one_frame(decoder_);
+                       return (bool)::FLAC__seekable_stream_decoder_process_one_frame(decoder_);
                }
 
                bool SeekableStream::process_remaining_frames()
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_process_remaining_frames(decoder_);
+                       return (bool)::FLAC__seekable_stream_decoder_process_remaining_frames(decoder_);
                }
 
                bool SeekableStream::seek_absolute(FLAC__uint64 sample)
                {
                        FLAC__ASSERT(is_valid());
-                       return ::FLAC__seekable_stream_decoder_seek_absolute(decoder_, sample);
+                       return (bool)::FLAC__seekable_stream_decoder_seek_absolute(decoder_, sample);
                }
 
                FLAC__SeekableStreamDecoderReadStatus SeekableStream::read_callback_(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
@@ -190,7 +232,7 @@ namespace FLAC {
                        return instance->eof_callback();
                }
 
-               FLAC__StreamDecoderWriteStatus SeekableStream::write_callback_(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 *buffer[], void *client_data)
+               FLAC__StreamDecoderWriteStatus SeekableStream::write_callback_(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
                {
                        (void) decoder;
                        FLAC__ASSERT(0 != client_data);
@@ -199,7 +241,7 @@ namespace FLAC {
                        return instance->write_callback(frame, buffer);
                }
 
-               void SeekableStream::metadata_callback_(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__StreamMetaData *metadata, void *client_data)
+               void SeekableStream::metadata_callback_(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *client_data)
                {
                        (void) decoder;
                        FLAC__ASSERT(0 != client_data);