summaryrefslogtreecommitdiff
path: root/src/pcm/PcmConvert.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-09-05 12:19:20 +0200
committerMax Kellermann <max@musicpd.org>2016-09-09 14:44:13 +0200
commitae1eb9ccdeb16183ad3faaf8dbf548b1934889db (patch)
tree17456fa28a7a030cbba445512def9c0bb9f8e306 /src/pcm/PcmConvert.hxx
parent860064c8128fd12b2ae6a32d399f01fe6390a223 (diff)
pcm/Convert: migrate from class Error to C++ exceptions
Diffstat (limited to 'src/pcm/PcmConvert.hxx')
-rw-r--r--src/pcm/PcmConvert.hxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/pcm/PcmConvert.hxx b/src/pcm/PcmConvert.hxx
index 8b49c001f..c717a6ae2 100644
--- a/src/pcm/PcmConvert.hxx
+++ b/src/pcm/PcmConvert.hxx
@@ -31,7 +31,6 @@
#endif
template<typename T> struct ConstBuffer;
-class Error;
/**
* This object is statically allocated (within another struct), and
@@ -57,9 +56,10 @@ public:
/**
* Prepare the object. Call Close() when done.
+ *
+ * Throws std::runtime_error on error.
*/
- bool Open(AudioFormat _src_format, AudioFormat _dest_format,
- Error &error);
+ void Open(AudioFormat _src_format, AudioFormat _dest_format);
/**
* Close the object after it was prepared with Open(). After
@@ -70,14 +70,15 @@ public:
/**
* Converts PCM data between two audio formats.
*
+ * Throws std::runtime_error on error.
+ *
* @param src the source PCM buffer
- * @param error location to store the error occurring
- * @return the destination buffer, or nullptr on error
+ * @return the destination buffer
*/
- ConstBuffer<void> Convert(ConstBuffer<void> src, Error &error);
+ ConstBuffer<void> Convert(ConstBuffer<void> src);
};
-bool
-pcm_convert_global_init(Error &error);
+void
+pcm_convert_global_init();
#endif