summaryrefslogtreecommitdiff
path: root/src/libFLAC++
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2017-01-15 06:47:51 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2017-01-15 09:48:42 +1100
commit71b909b7a48bd112b7c05ae5dead92b3fc6e585a (patch)
treed9be7756c776a37e22292bb485228ba768fed38f /src/libFLAC++
parent588689b1385f9291602b88ea82e1c79d38b0080b (diff)
downloadflac-71b909b7a48bd112b7c05ae5dead92b3fc6e585a.tar.gz
Yet more purging of `unsigned` type
Diffstat (limited to 'src/libFLAC++')
-rw-r--r--src/libFLAC++/metadata.cpp132
-rw-r--r--src/libFLAC++/stream_decoder.cpp8
-rw-r--r--src/libFLAC++/stream_encoder.cpp58
3 files changed, 99 insertions, 99 deletions
diff --git a/src/libFLAC++/metadata.cpp b/src/libFLAC++/metadata.cpp
index b3d04d77..ddedeed6 100644
--- a/src/libFLAC++/metadata.cpp
+++ b/src/libFLAC++/metadata.cpp
@@ -212,7 +212,7 @@ namespace FLAC {
return object_->type;
}
- unsigned Prototype::get_length() const
+ uint32_t Prototype::get_length() const
{
FLAC__ASSERT(is_valid());
return object_->length;
@@ -236,43 +236,43 @@ namespace FLAC {
StreamInfo::~StreamInfo()
{ }
- unsigned StreamInfo::get_min_blocksize() const
+ uint32_t StreamInfo::get_min_blocksize() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.min_blocksize;
}
- unsigned StreamInfo::get_max_blocksize() const
+ uint32_t StreamInfo::get_max_blocksize() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.max_blocksize;
}
- unsigned StreamInfo::get_min_framesize() const
+ uint32_t StreamInfo::get_min_framesize() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.min_framesize;
}
- unsigned StreamInfo::get_max_framesize() const
+ uint32_t StreamInfo::get_max_framesize() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.max_framesize;
}
- unsigned StreamInfo::get_sample_rate() const
+ uint32_t StreamInfo::get_sample_rate() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.sample_rate;
}
- unsigned StreamInfo::get_channels() const
+ uint32_t StreamInfo::get_channels() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.channels;
}
- unsigned StreamInfo::get_bits_per_sample() const
+ uint32_t StreamInfo::get_bits_per_sample() const
{
FLAC__ASSERT(is_valid());
return object_->data.stream_info.bits_per_sample;
@@ -290,7 +290,7 @@ namespace FLAC {
return object_->data.stream_info.md5sum;
}
- void StreamInfo::set_min_blocksize(unsigned value)
+ void StreamInfo::set_min_blocksize(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value >= FLAC__MIN_BLOCK_SIZE);
@@ -298,7 +298,7 @@ namespace FLAC {
object_->data.stream_info.min_blocksize = value;
}
- void StreamInfo::set_max_blocksize(unsigned value)
+ void StreamInfo::set_max_blocksize(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value >= FLAC__MIN_BLOCK_SIZE);
@@ -306,28 +306,28 @@ namespace FLAC {
object_->data.stream_info.max_blocksize = value;
}
- void StreamInfo::set_min_framesize(unsigned value)
+ void StreamInfo::set_min_framesize(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value < (1u << FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN));
object_->data.stream_info.min_framesize = value;
}
- void StreamInfo::set_max_framesize(unsigned value)
+ void StreamInfo::set_max_framesize(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value < (1u << FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN));
object_->data.stream_info.max_framesize = value;
}
- void StreamInfo::set_sample_rate(unsigned value)
+ void StreamInfo::set_sample_rate(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(FLAC__format_sample_rate_is_valid(value));
object_->data.stream_info.sample_rate = value;
}
- void StreamInfo::set_channels(unsigned value)
+ void StreamInfo::set_channels(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value > 0);
@@ -335,7 +335,7 @@ namespace FLAC {
object_->data.stream_info.channels = value;
}
- void StreamInfo::set_bits_per_sample(unsigned value)
+ void StreamInfo::set_bits_per_sample(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value >= FLAC__MIN_BITS_PER_SAMPLE);
@@ -366,7 +366,7 @@ namespace FLAC {
Prototype(FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING), /*copy=*/false)
{ }
- Padding::Padding(unsigned length):
+ Padding::Padding(uint32_t length):
Prototype(FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING), /*copy=*/false)
{
set_length(length);
@@ -375,7 +375,7 @@ namespace FLAC {
Padding::~Padding()
{ }
- void Padding::set_length(unsigned length)
+ void Padding::set_length(uint32_t length)
{
FLAC__ASSERT(is_valid());
object_->length = length;
@@ -412,13 +412,13 @@ namespace FLAC {
memcpy(object_->data.application.id, value, 4);
}
- bool Application::set_data(const FLAC__byte *data, unsigned length)
+ bool Application::set_data(const FLAC__byte *data, uint32_t length)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_application_set_data(object_, (FLAC__byte*)data, length, true);
}
- bool Application::set_data(FLAC__byte *data, unsigned length, bool copy)
+ bool Application::set_data(FLAC__byte *data, uint32_t length, bool copy)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_application_set_data(object_, data, length, copy);
@@ -436,40 +436,40 @@ namespace FLAC {
SeekTable::~SeekTable()
{ }
- unsigned SeekTable::get_num_points() const
+ uint32_t SeekTable::get_num_points() const
{
FLAC__ASSERT(is_valid());
return object_->data.seek_table.num_points;
}
- ::FLAC__StreamMetadata_SeekPoint SeekTable::get_point(unsigned indx) const
+ ::FLAC__StreamMetadata_SeekPoint SeekTable::get_point(uint32_t indx) const
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx < object_->data.seek_table.num_points);
return object_->data.seek_table.points[indx];
}
- bool SeekTable::resize_points(unsigned new_num_points)
+ bool SeekTable::resize_points(uint32_t new_num_points)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_seektable_resize_points(object_, new_num_points);
}
- void SeekTable::set_point(unsigned indx, const ::FLAC__StreamMetadata_SeekPoint &point)
+ void SeekTable::set_point(uint32_t indx, const ::FLAC__StreamMetadata_SeekPoint &point)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx < object_->data.seek_table.num_points);
::FLAC__metadata_object_seektable_set_point(object_, indx, point);
}
- bool SeekTable::insert_point(unsigned indx, const ::FLAC__StreamMetadata_SeekPoint &point)
+ bool SeekTable::insert_point(uint32_t indx, const ::FLAC__StreamMetadata_SeekPoint &point)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx <= object_->data.seek_table.num_points);
return (bool)::FLAC__metadata_object_seektable_insert_point(object_, indx, point);
}
- bool SeekTable::delete_point(unsigned indx)
+ bool SeekTable::delete_point(uint32_t indx)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx < object_->data.seek_table.num_points);
@@ -482,7 +482,7 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_seektable_is_legal(object_);
}
- bool SeekTable::template_append_placeholders(unsigned num)
+ bool SeekTable::template_append_placeholders(uint32_t num)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_seektable_template_append_placeholders(object_, num);
@@ -494,19 +494,19 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_seektable_template_append_point(object_, sample_number);
}
- bool SeekTable::template_append_points(FLAC__uint64 sample_numbers[], unsigned num)
+ bool SeekTable::template_append_points(FLAC__uint64 sample_numbers[], uint32_t num)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_seektable_template_append_points(object_, sample_numbers, num);
}
- bool SeekTable::template_append_spaced_points(unsigned num, FLAC__uint64 total_samples)
+ bool SeekTable::template_append_spaced_points(uint32_t num, FLAC__uint64 total_samples)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_seektable_template_append_spaced_points(object_, num, total_samples);
}
- bool SeekTable::template_append_spaced_points_by_samples(unsigned samples, FLAC__uint64 total_samples)
+ bool SeekTable::template_append_spaced_points_by_samples(uint32_t samples, FLAC__uint64 total_samples)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_seektable_template_append_spaced_points_by_samples(object_, samples, total_samples);
@@ -534,7 +534,7 @@ namespace FLAC {
zero();
}
- VorbisComment::Entry::Entry(const char *field, unsigned field_length) :
+ VorbisComment::Entry::Entry(const char *field, uint32_t field_length) :
is_valid_(true),
entry_(),
field_name_(0),
@@ -558,7 +558,7 @@ namespace FLAC {
construct(field);
}
- VorbisComment::Entry::Entry(const char *field_name, const char *field_value, unsigned field_value_length) :
+ VorbisComment::Entry::Entry(const char *field_name, const char *field_value, uint32_t field_value_length) :
is_valid_(true),
entry_(),
field_name_(0),
@@ -613,19 +613,19 @@ namespace FLAC {
return is_valid_;
}
- unsigned VorbisComment::Entry::get_field_length() const
+ uint32_t VorbisComment::Entry::get_field_length() const
{
FLAC__ASSERT(is_valid());
return entry_.length;
}
- unsigned VorbisComment::Entry::get_field_name_length() const
+ uint32_t VorbisComment::Entry::get_field_name_length() const
{
FLAC__ASSERT(is_valid());
return field_name_length_;
}
- unsigned VorbisComment::Entry::get_field_value_length() const
+ uint32_t VorbisComment::Entry::get_field_value_length() const
{
FLAC__ASSERT(is_valid());
return field_value_length_;
@@ -655,7 +655,7 @@ namespace FLAC {
return field_value_;
}
- bool VorbisComment::Entry::set_field(const char *field, unsigned field_length)
+ bool VorbisComment::Entry::set_field(const char *field, uint32_t field_length)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(0 != field);
@@ -704,7 +704,7 @@ namespace FLAC {
return is_valid_;
}
- bool VorbisComment::Entry::set_field_value(const char *field_value, unsigned field_value_length)
+ bool VorbisComment::Entry::set_field_value(const char *field_value, uint32_t field_value_length)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(0 != field_value);
@@ -778,7 +778,7 @@ namespace FLAC {
}
}
- void VorbisComment::Entry::construct(const char *field, unsigned field_length)
+ void VorbisComment::Entry::construct(const char *field, uint32_t field_length)
{
if(set_field(field, field_length))
parse_field();
@@ -789,7 +789,7 @@ namespace FLAC {
construct(field, strlen(field));
}
- void VorbisComment::Entry::construct(const char *field_name, const char *field_value, unsigned field_value_length)
+ void VorbisComment::Entry::construct(const char *field_name, const char *field_value, uint32_t field_value_length)
{
if(set_field_name(field_name) && set_field_value(field_value, field_value_length))
compose_field();
@@ -830,7 +830,7 @@ namespace FLAC {
if(0 == p)
p = (const char *)entry_.entry + entry_.length;
- field_name_length_ = (unsigned)(p - (const char *)entry_.entry);
+ field_name_length_ = (uint32_t)(p - (const char *)entry_.entry);
if(0 == (field_name_ = (char *)safe_malloc_add_2op_(field_name_length_, /*+*/1))) { // +1 for the trailing \0
is_valid_ = false;
return;
@@ -870,7 +870,7 @@ namespace FLAC {
VorbisComment::~VorbisComment()
{ }
- unsigned VorbisComment::get_num_comments() const
+ uint32_t VorbisComment::get_num_comments() const
{
FLAC__ASSERT(is_valid());
return object_->data.vorbis_comment.num_comments;
@@ -882,7 +882,7 @@ namespace FLAC {
return object_->data.vorbis_comment.vendor_string.entry;
}
- VorbisComment::Entry VorbisComment::get_comment(unsigned indx) const
+ VorbisComment::Entry VorbisComment::get_comment(uint32_t indx) const
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx < object_->data.vorbis_comment.num_comments);
@@ -897,20 +897,20 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_vorbiscomment_set_vendor_string(object_, vendor_string, /*copy=*/true);
}
- bool VorbisComment::resize_comments(unsigned new_num_comments)
+ bool VorbisComment::resize_comments(uint32_t new_num_comments)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_vorbiscomment_resize_comments(object_, new_num_comments);
}
- bool VorbisComment::set_comment(unsigned indx, const VorbisComment::Entry &entry)
+ bool VorbisComment::set_comment(uint32_t indx, const VorbisComment::Entry &entry)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx < object_->data.vorbis_comment.num_comments);
return (bool)::FLAC__metadata_object_vorbiscomment_set_comment(object_, indx, entry.get_entry(), /*copy=*/true);
}
- bool VorbisComment::insert_comment(unsigned indx, const VorbisComment::Entry &entry)
+ bool VorbisComment::insert_comment(uint32_t indx, const VorbisComment::Entry &entry)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx <= object_->data.vorbis_comment.num_comments);
@@ -929,14 +929,14 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_vorbiscomment_replace_comment(object_, entry.get_entry(), all, /*copy=*/true);
}
- bool VorbisComment::delete_comment(unsigned indx)
+ bool VorbisComment::delete_comment(uint32_t indx)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(indx < object_->data.vorbis_comment.num_comments);
return (bool)::FLAC__metadata_object_vorbiscomment_delete_comment(object_, indx);
}
- int VorbisComment::find_entry_from(unsigned offset, const char *field_name)
+ int VorbisComment::find_entry_from(uint32_t offset, const char *field_name)
{
FLAC__ASSERT(is_valid());
return ::FLAC__metadata_object_vorbiscomment_find_entry_from(object_, offset, field_name);
@@ -990,7 +990,7 @@ namespace FLAC {
return(0 != object_);
}
- ::FLAC__StreamMetadata_CueSheet_Index CueSheet::Track::get_index(unsigned i) const
+ ::FLAC__StreamMetadata_CueSheet_Index CueSheet::Track::get_index(uint32_t i) const
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i < object_->num_indices);
@@ -1005,14 +1005,14 @@ namespace FLAC {
object_->isrc[12] = '\0';
}
- void CueSheet::Track::set_type(unsigned value)
+ void CueSheet::Track::set_type(uint32_t value)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(value <= 1);
object_->type = value;
}
- void CueSheet::Track::set_index(unsigned i, const ::FLAC__StreamMetadata_CueSheet_Index &indx)
+ void CueSheet::Track::set_index(uint32_t i, const ::FLAC__StreamMetadata_CueSheet_Index &indx)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i < object_->num_indices);
@@ -1049,13 +1049,13 @@ namespace FLAC {
return object_->data.cue_sheet.is_cd? true : false;
}
- unsigned CueSheet::get_num_tracks() const
+ uint32_t CueSheet::get_num_tracks() const
{
FLAC__ASSERT(is_valid());
return object_->data.cue_sheet.num_tracks;
}
- CueSheet::Track CueSheet::get_track(unsigned i) const
+ CueSheet::Track CueSheet::get_track(uint32_t i) const
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i < object_->data.cue_sheet.num_tracks);
@@ -1082,7 +1082,7 @@ namespace FLAC {
object_->data.cue_sheet.is_cd = value;
}
- void CueSheet::set_index(unsigned track_num, unsigned index_num, const ::FLAC__StreamMetadata_CueSheet_Index &indx)
+ void CueSheet::set_index(uint32_t track_num, uint32_t index_num, const ::FLAC__StreamMetadata_CueSheet_Index &indx)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(track_num < object_->data.cue_sheet.num_tracks);
@@ -1090,14 +1090,14 @@ namespace FLAC {
object_->data.cue_sheet.tracks[track_num].indices[index_num] = indx;
}
- bool CueSheet::resize_indices(unsigned track_num, unsigned new_num_indices)
+ bool CueSheet::resize_indices(uint32_t track_num, uint32_t new_num_indices)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(track_num < object_->data.cue_sheet.num_tracks);
return (bool)::FLAC__metadata_object_cuesheet_track_resize_indices(object_, track_num, new_num_indices);
}
- bool CueSheet::insert_index(unsigned track_num, unsigned index_num, const ::FLAC__StreamMetadata_CueSheet_Index &indx)
+ bool CueSheet::insert_index(uint32_t track_num, uint32_t index_num, const ::FLAC__StreamMetadata_CueSheet_Index &indx)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(track_num < object_->data.cue_sheet.num_tracks);
@@ -1105,7 +1105,7 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_cuesheet_track_insert_index(object_, track_num, index_num, indx);
}
- bool CueSheet::insert_blank_index(unsigned track_num, unsigned index_num)
+ bool CueSheet::insert_blank_index(uint32_t track_num, uint32_t index_num)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(track_num < object_->data.cue_sheet.num_tracks);
@@ -1113,7 +1113,7 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_cuesheet_track_insert_blank_index(object_, track_num, index_num);
}
- bool CueSheet::delete_index(unsigned track_num, unsigned index_num)
+ bool CueSheet::delete_index(uint32_t track_num, uint32_t index_num)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(track_num < object_->data.cue_sheet.num_tracks);
@@ -1121,13 +1121,13 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_cuesheet_track_delete_index(object_, track_num, index_num);
}
- bool CueSheet::resize_tracks(unsigned new_num_tracks)
+ bool CueSheet::resize_tracks(uint32_t new_num_tracks)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_cuesheet_resize_tracks(object_, new_num_tracks);
}
- bool CueSheet::set_track(unsigned i, const CueSheet::Track &track)
+ bool CueSheet::set_track(uint32_t i, const CueSheet::Track &track)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i < object_->data.cue_sheet.num_tracks);
@@ -1135,7 +1135,7 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_cuesheet_set_track(object_, i, const_cast< ::FLAC__StreamMetadata_CueSheet_Track*>(track.get_track()), /*copy=*/true);
}
- bool CueSheet::insert_track(unsigned i, const CueSheet::Track &track)
+ bool CueSheet::insert_track(uint32_t i, const CueSheet::Track &track)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i <= object_->data.cue_sheet.num_tracks);
@@ -1143,14 +1143,14 @@ namespace FLAC {
return (bool)::FLAC__metadata_object_cuesheet_insert_track(object_, i, const_cast< ::FLAC__StreamMetadata_CueSheet_Track*>(track.get_track()), /*copy=*/true);
}
- bool CueSheet::insert_blank_track(unsigned i)
+ bool CueSheet::insert_blank_track(uint32_t i)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i <= object_->data.cue_sheet.num_tracks);
return (bool)::FLAC__metadata_object_cuesheet_insert_blank_track(object_, i);
}
- bool CueSheet::delete_track(unsigned i)
+ bool CueSheet::delete_track(uint32_t i)
{
FLAC__ASSERT(is_valid());
FLAC__ASSERT(i < object_->data.cue_sheet.num_tracks);
@@ -1310,13 +1310,13 @@ namespace FLAC {
return object_->data.application.data;
}
- bool Unknown::set_data(const FLAC__byte *data, unsigned length)
+ bool Unknown::set_data(const FLAC__byte *data, uint32_t length)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_application_set_data(object_, (FLAC__byte*)data, length, true);
}
- bool Unknown::set_data(FLAC__byte *data, unsigned length, bool copy)
+ bool Unknown::set_data(FLAC__byte *data, uint32_t length, bool copy)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__metadata_object_application_set_data(object_, data, length, copy);
@@ -1403,7 +1403,7 @@ namespace FLAC {
return false;
}
- FLACPP_API bool get_picture(const char *filename, Picture *&picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)
+ FLACPP_API bool get_picture(const char *filename, Picture *&picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, uint32_t max_width, uint32_t max_height, uint32_t max_depth, uint32_t max_colors)
{
FLAC__ASSERT(0 != filename);
@@ -1419,7 +1419,7 @@ namespace FLAC {
return false;
}
- FLACPP_API bool get_picture(const char *filename, Picture &picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)
+ FLACPP_API bool get_picture(const char *filename, Picture &picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, uint32_t max_width, uint32_t max_height, uint32_t max_depth, uint32_t max_colors)
{
FLAC__ASSERT(0 != filename);
@@ -1513,7 +1513,7 @@ namespace FLAC {
}
//@@@@ add to tests
- unsigned SimpleIterator::get_block_length() const
+ uint32_t SimpleIterator::get_block_length() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__metadata_simple_iterator_get_block_length(iterator_);
diff --git a/src/libFLAC++/stream_decoder.cpp b/src/libFLAC++/stream_decoder.cpp
index 8ab39819..c2969449 100644
--- a/src/libFLAC++/stream_decoder.cpp
+++ b/src/libFLAC++/stream_decoder.cpp
@@ -134,7 +134,7 @@ namespace FLAC {
return ::FLAC__stream_decoder_get_total_samples(decoder_);
}
- unsigned Stream::get_channels() const
+ uint32_t Stream::get_channels() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_decoder_get_channels(decoder_);
@@ -146,19 +146,19 @@ namespace FLAC {
return ::FLAC__stream_decoder_get_channel_assignment(decoder_);
}
- unsigned Stream::get_bits_per_sample() const
+ uint32_t Stream::get_bits_per_sample() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_decoder_get_bits_per_sample(decoder_);
}
- unsigned Stream::get_sample_rate() const
+ uint32_t Stream::get_sample_rate() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_decoder_get_sample_rate(decoder_);
}
- unsigned Stream::get_blocksize() const
+ uint32_t Stream::get_blocksize() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_decoder_get_blocksize(decoder_);
diff --git a/src/libFLAC++/stream_encoder.cpp b/src/libFLAC++/stream_encoder.cpp
index 9466ea8d..3b081923 100644
--- a/src/libFLAC++/stream_encoder.cpp
+++ b/src/libFLAC++/stream_encoder.cpp
@@ -87,31 +87,31 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_set_streamable_subset(encoder_, value);
}
- bool Stream::set_channels(unsigned value)
+ bool Stream::set_channels(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_channels(encoder_, value);
}
- bool Stream::set_bits_per_sample(unsigned value)
+ bool Stream::set_bits_per_sample(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_bits_per_sample(encoder_, value);
}
- bool Stream::set_sample_rate(unsigned value)
+ bool Stream::set_sample_rate(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_sample_rate(encoder_, value);
}
- bool Stream::set_compression_level(unsigned value)
+ bool Stream::set_compression_level(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_compression_level(encoder_, value);
}
- bool Stream::set_blocksize(unsigned value)
+ bool Stream::set_blocksize(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_blocksize(encoder_, value);
@@ -135,13 +135,13 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_set_apodization(encoder_, specification);
}
- bool Stream::set_max_lpc_order(unsigned value)
+ bool Stream::set_max_lpc_order(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_max_lpc_order(encoder_, value);
}
- bool Stream::set_qlp_coeff_precision(unsigned value)
+ bool Stream::set_qlp_coeff_precision(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_qlp_coeff_precision(encoder_, value);
@@ -165,19 +165,19 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_set_do_exhaustive_model_search(encoder_, value);
}
- bool Stream::set_min_residual_partition_order(unsigned value)
+ bool Stream::set_min_residual_partition_order(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_min_residual_partition_order(encoder_, value);
}
- bool Stream::set_max_residual_partition_order(unsigned value)
+ bool Stream::set_max_residual_partition_order(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_max_residual_partition_order(encoder_, value);
}
- bool Stream::set_rice_parameter_search_dist(unsigned value)
+ bool Stream::set_rice_parameter_search_dist(uint32_t value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_rice_parameter_search_dist(encoder_, value);
@@ -189,13 +189,13 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_set_total_samples_estimate(encoder_, value);
}
- bool Stream::set_metadata(::FLAC__StreamMetadata **metadata, unsigned num_blocks)
+ bool Stream::set_metadata(::FLAC__StreamMetadata **metadata, uint32_t num_blocks)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_set_metadata(encoder_, metadata, num_blocks);
}
- bool Stream::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
+ bool Stream::set_metadata(FLAC::Metadata::Prototype **metadata, uint32_t num_blocks)
{
FLAC__ASSERT(is_valid());
#ifndef HAVE_CXX_VARARRAYS
@@ -206,7 +206,7 @@ namespace FLAC {
#else
::FLAC__StreamMetadata *m[num_blocks];
#endif
- for(unsigned i = 0; i < num_blocks; i++) {
+ for(uint32_t i = 0; i < num_blocks; i++) {
// we can get away with the const_cast since we know the encoder will only correct the is_last flags
m[i] = const_cast< ::FLAC__StreamMetadata*>(static_cast<const ::FLAC__StreamMetadata*>(*metadata[i]));
}
@@ -232,7 +232,7 @@ namespace FLAC {
return Decoder::Stream::State(::FLAC__stream_encoder_get_verify_decoder_state(encoder_));
}
- void Stream::get_verify_decoder_error_stats(FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got)
+ void Stream::get_verify_decoder_error_stats(FLAC__uint64 *absolute_sample, uint32_t *frame_number, uint32_t *channel, uint32_t *sample, FLAC__int32 *expected, FLAC__int32 *got)
{
FLAC__ASSERT(is_valid());
::FLAC__stream_encoder_get_verify_decoder_error_stats(encoder_, absolute_sample, frame_number, channel, sample, expected, got);
@@ -262,37 +262,37 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_get_loose_mid_side_stereo(encoder_);
}
- unsigned Stream::get_channels() const
+ uint32_t Stream::get_channels() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_channels(encoder_);
}
- unsigned Stream::get_bits_per_sample() const
+ uint32_t Stream::get_bits_per_sample() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_bits_per_sample(encoder_);
}
- unsigned Stream::get_sample_rate() const
+ uint32_t Stream::get_sample_rate() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_sample_rate(encoder_);
}
- unsigned Stream::get_blocksize() const
+ uint32_t Stream::get_blocksize() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_blocksize(encoder_);
}
- unsigned Stream::get_max_lpc_order() const
+ uint32_t Stream::get_max_lpc_order() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_max_lpc_order(encoder_);
}
- unsigned Stream::get_qlp_coeff_precision() const
+ uint32_t Stream::get_qlp_coeff_precision() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_qlp_coeff_precision(encoder_);
@@ -316,19 +316,19 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_get_do_exhaustive_model_search(encoder_);
}
- unsigned Stream::get_min_residual_partition_order() const
+ uint32_t Stream::get_min_residual_partition_order() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_min_residual_partition_order(encoder_);
}
- unsigned Stream::get_max_residual_partition_order() const
+ uint32_t Stream::get_max_residual_partition_order() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_max_residual_partition_order(encoder_);
}
- unsigned Stream::get_rice_parameter_search_dist() const
+ uint32_t Stream::get_rice_parameter_search_dist() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_encoder_get_rice_parameter_search_dist(encoder_);
@@ -358,13 +358,13 @@ namespace FLAC {
return (bool)::FLAC__stream_encoder_finish(encoder_);
}
- bool Stream::process(const FLAC__int32 * const buffer[], unsigned samples)
+ bool Stream::process(const FLAC__int32 * const buffer[], uint32_t samples)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_process(encoder_, buffer, samples);
}
- bool Stream::process_interleaved(const FLAC__int32 buffer[], unsigned samples)
+ bool Stream::process_interleaved(const FLAC__int32 buffer[], uint32_t samples)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_encoder_process_interleaved(encoder_, buffer, samples);
@@ -402,7 +402,7 @@ namespace FLAC {
return instance->read_callback(buffer, bytes);
}
- ::FLAC__StreamEncoderWriteStatus Stream::write_callback_(const ::FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)
+ ::FLAC__StreamEncoderWriteStatus Stream::write_callback_(const ::FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data)
{
(void)encoder;
FLAC__ASSERT(0 != client_data);
@@ -491,19 +491,19 @@ namespace FLAC {
// with FLAC__stream_decoder_init_FILE() or
// FLAC__stream_decoder_init_file() and those supply the read
// callback internally.
- ::FLAC__StreamEncoderWriteStatus File::write_callback(const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame)
+ ::FLAC__StreamEncoderWriteStatus File::write_callback(const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame)
{
(void)buffer, (void)bytes, (void)samples, (void)current_frame;
FLAC__ASSERT(false);
return ::FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR; // double protection
}
- void File::progress_callback(FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate)
+ void File::progress_callback(FLAC__uint64 bytes_written, FLAC__uint64 samples_written, uint32_t frames_written, uint32_t total_frames_estimate)
{
(void)bytes_written, (void)samples_written, (void)frames_written, (void)total_frames_estimate;
}
- void File::progress_callback_(const ::FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data)
+ void File::progress_callback_(const ::FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, uint32_t frames_written, uint32_t total_frames_estimate, void *client_data)
{
(void)encoder;
FLAC__ASSERT(0 != client_data);