decoder/flac: migrate from class Error to C++ exceptions

This commit is contained in:
Max Kellermann
2016-11-10 12:19:33 +01:00
parent 42a696873b
commit 4e16ea0f0a
4 changed files with 18 additions and 19 deletions

View File

@@ -26,7 +26,6 @@
#include <FLAC/ordinals.h>
class Error;
template<typename T> struct ConstBuffer;
/**
@@ -39,8 +38,11 @@ class FlacPcmImport {
AudioFormat audio_format;
public:
bool Open(unsigned sample_rate, unsigned bits_per_sample,
unsigned channels, Error &error);
/**
* Throws #std::runtime_error on error.
*/
void Open(unsigned sample_rate, unsigned bits_per_sample,
unsigned channels);
const AudioFormat &GetAudioFormat() const {
return audio_format;