aboutsummaryrefslogtreecommitdiffstats
path: root/src/chunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/chunk.h')
-rw-r--r--src/chunk.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/chunk.h b/src/chunk.h
index 2136c9349..7d39ebdf7 100644
--- a/src/chunk.h
+++ b/src/chunk.h
@@ -19,6 +19,10 @@
#ifndef MPD_CHUNK_H
#define MPD_CHUNK_H
+#ifndef NDEBUG
+#include "audio_format.h"
+#endif
+
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
@@ -57,6 +61,10 @@ struct music_chunk {
/** the data (probably PCM) */
char data[CHUNK_SIZE];
+
+#ifndef NDEBUG
+ struct audio_format audio_format;
+#endif
};
void
@@ -71,6 +79,16 @@ music_chunk_is_empty(const struct music_chunk *chunk)
return chunk->length == 0 && chunk->tag == NULL;
}
+#ifndef NDEBUG
+/**
+ * Checks if the audio format if the chunk is equal to the specified
+ * audio_format.
+ */
+bool
+music_chunk_check_format(const struct music_chunk *chunk,
+ const struct audio_format *audio_format);
+#endif
+
/**
* Prepares appending to the music chunk. Returns a buffer where you
* may write into. After you are finished, call music_chunk_expand().