aboutsummaryrefslogtreecommitdiffstats
path: root/src/wavfile.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-24 14:43:24 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-24 14:43:24 +0200
commit62409ce26f1fd41d915c4022088fcb8b133ae6c6 (patch)
tree9ce0442470430445daf09ad6deb5f52026078c4b /src/wavfile.h
parent864cebd1d753a603de9a24d26a830bad87e2a42f (diff)
downloadODR-AudioEnc-62409ce26f1fd41d915c4022088fcb8b133ae6c6.tar.gz
ODR-AudioEnc-62409ce26f1fd41d915c4022088fcb8b133ae6c6.tar.bz2
ODR-AudioEnc-62409ce26f1fd41d915c4022088fcb8b133ae6c6.zip
Add a --decoder option for loopback testing
Diffstat (limited to 'src/wavfile.h')
-rw-r--r--src/wavfile.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wavfile.h b/src/wavfile.h
index 92ea56f..a8cd4d9 100644
--- a/src/wavfile.h
+++ b/src/wavfile.h
@@ -20,6 +20,7 @@
#pragma once
#include <cstdio>
+#include <cstdint>
void* wav_read_open(const char *filename);
void wav_read_close(void* obj);
@@ -29,12 +30,14 @@ int wav_read_data(void* obj, unsigned char* data, unsigned int length);
class WavWriter {
public:
- WavWriter(const char *filename, int rate);
+ WavWriter(const char *filename);
~WavWriter();
WavWriter(const WavWriter& other) = delete;
WavWriter& operator=(const WavWriter& other) = delete;
- void write_data(short *data, int length);
+ void initialise_header(int rate);
+
+ void write_data(const uint8_t *data, int length);
private:
FILE *m_fd = nullptr;