/* libFLAC++ - Free Lossless Audio Codec library
- * Copyright (C) 2002,2003,2004,2005,2006 Josh Coalson
+ * Copyright (C) 2002-2009 Josh Coalson
+ * Copyright (C) 2011-2013 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Stream::~Stream()
{
if(0 != decoder_) {
- ::FLAC__stream_decoder_finish(decoder_);
+ (void)::FLAC__stream_decoder_finish(decoder_);
::FLAC__stream_decoder_delete(decoder_);
}
}
return ::FLAC__stream_decoder_get_blocksize(decoder_);
}
+ bool Stream::get_decode_position(FLAC__uint64 *position) const
+ {
+ FLAC__ASSERT(is_valid());
+ return ::FLAC__stream_decoder_get_decode_position(decoder_, position);
+ }
+
::FLAC__StreamDecoderInitStatus Stream::init()
{
FLAC__ASSERT(is_valid());
return ::FLAC__stream_decoder_init_ogg_stream(decoder_, read_callback_, seek_callback_, tell_callback_, length_callback_, eof_callback_, write_callback_, metadata_callback_, error_callback_, /*client_data=*/(void*)this);
}
- void Stream::finish()
+ bool Stream::finish()
{
FLAC__ASSERT(is_valid());
- ::FLAC__stream_decoder_finish(decoder_);
+ return (bool)::FLAC__stream_decoder_finish(decoder_);
}
bool Stream::flush()