diff options
author | Max Kellermann <max@musicpd.org> | 2016-09-05 12:19:20 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-09-09 14:44:13 +0200 |
commit | ae1eb9ccdeb16183ad3faaf8dbf548b1934889db (patch) | |
tree | 17456fa28a7a030cbba445512def9c0bb9f8e306 /src/pcm/ChannelsConverter.hxx | |
parent | 860064c8128fd12b2ae6a32d399f01fe6390a223 (diff) |
pcm/Convert: migrate from class Error to C++ exceptions
Diffstat (limited to 'src/pcm/ChannelsConverter.hxx')
-rw-r--r-- | src/pcm/ChannelsConverter.hxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/pcm/ChannelsConverter.hxx b/src/pcm/ChannelsConverter.hxx index ce893a20f..8ad3ac5ee 100644 --- a/src/pcm/ChannelsConverter.hxx +++ b/src/pcm/ChannelsConverter.hxx @@ -28,7 +28,6 @@ #include <assert.h> #endif -class Error; template<typename T> struct ConstBuffer; /** @@ -53,15 +52,14 @@ public: /** * Opens the object, prepare for Convert(). * + * Throws std::runtime_error on error. + * * @param format the sample format * @param src_channels the number of source channels * @param dest_channels the number of destination channels - * @param error location to store the error - * @return true on success */ - bool Open(SampleFormat format, - unsigned src_channels, unsigned dest_channels, - Error &error); + void Open(SampleFormat format, + unsigned src_channels, unsigned dest_channels); /** * Closes the object. After that, you may call Open() again. @@ -71,13 +69,13 @@ public: /** * Convert a block of PCM data. * + * Throws std::runtime_error on error. + * * @param src the input buffer - * @param error location to store the error - * @return the destination buffer on success, - * ConstBuffer::Null() on error + * @return the destination buffer */ gcc_pure - ConstBuffer<void> Convert(ConstBuffer<void> src, Error &error); + ConstBuffer<void> Convert(ConstBuffer<void> src); }; #endif |