aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_convert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm_convert.h')
-rw-r--r--src/pcm_convert.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/pcm_convert.h b/src/pcm_convert.h
index be08ad8a8..7ef0782df 100644
--- a/src/pcm_convert.h
+++ b/src/pcm_convert.h
@@ -41,8 +41,17 @@ struct pcm_convert_state {
/** the buffer for converting the channel count */
struct pcm_buffer channels_buffer;
+
+ /** the buffer for swapping the byte order */
+ struct pcm_buffer byteswap_buffer;
};
+static inline GQuark
+pcm_convert_quark(void)
+{
+ return g_quark_from_static_string("pcm_convert");
+}
+
/**
* Initializes a pcm_convert_state object.
*/
@@ -63,13 +72,16 @@ void pcm_convert_deinit(struct pcm_convert_state *state);
* @param src_size the size of #src in bytes
* @param dest_format the requested destination audio format
* @param dest_size_r returns the number of bytes of the destination buffer
- * @return the destination buffer
+ * @param error_r location to store the error occuring, or NULL to
+ * ignore errors
+ * @return the destination buffer, or NULL on error
*/
const void *
pcm_convert(struct pcm_convert_state *state,
const struct audio_format *src_format,
const void *src, size_t src_size,
const struct audio_format *dest_format,
- size_t *dest_size_r);
+ size_t *dest_size_r,
+ GError **error_r);
#endif