summaryrefslogtreecommitdiffstats
path: root/parecord/audio_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'parecord/audio_types.h')
-rw-r--r--parecord/audio_types.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/parecord/audio_types.h b/parecord/audio_types.h
new file mode 100644
index 0000000..90a5fc6
--- /dev/null
+++ b/parecord/audio_types.h
@@ -0,0 +1,23 @@
+#ifndef PAR_AUDIOTYPES_H
+#define PAR_AUDIOTYPES_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "wav_header.h"
+
+#define AUDIO_FORMAT_NONE -1
+#define AUDIO_FORMAT_WAVE 0
+
+struct audio_format {
+ const char *name;
+ off_t rsv_bytes;
+};
+
+struct wav_header *init_wav_header(struct wav_header *header,
+ uint32_t size, uint32_t subchunk1Size, uint16_t audioFormat,
+ uint16_t numChannels, uint32_t sampleRate, uint32_t bitsPerSample);
+int checkAudioFormat(char *source);
+off_t getOffset(int format);
+
+#endif /* AT_AUDIOTYPES_H */