aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_byteswap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm_byteswap.h')
-rw-r--r--src/pcm_byteswap.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/pcm_byteswap.h b/src/pcm_byteswap.h
index 005e75ded..0836a2512 100644
--- a/src/pcm_byteswap.h
+++ b/src/pcm_byteswap.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -20,6 +20,8 @@
#ifndef MPD_PCM_BYTESWAP_H
#define MPD_PCM_BYTESWAP_H
+#include "audio_format.h"
+
#include <stdint.h>
#include <stddef.h>
@@ -47,4 +49,19 @@ const int16_t *pcm_byteswap_16(struct pcm_buffer *buffer,
const int32_t *pcm_byteswap_32(struct pcm_buffer *buffer,
const int32_t *src, size_t len);
+/**
+ * Changes the endianness of PCM data.
+ *
+ * @param buffer the destination pcm_buffer object
+ * @param format the sample format (both input and output)
+ * @param src the source PCM buffer
+ * @param src_size the number of bytes in #src
+ * @return the destination buffer, or NULL if the sample format is not
+ * supported
+ */
+G_GNUC_MALLOC
+const void *
+pcm_byteswap(struct pcm_buffer *buffer, enum sample_format format,
+ const void *src, size_t size);
+
#endif