summaryrefslogtreecommitdiff
path: root/src/encoder/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-04-30 14:28:25 +0200
committerMax Kellermann <max@duempel.org>2016-04-30 14:28:25 +0200
commit3fb8f3ec952d1e798e5592b84752dbeebecd660d (patch)
tree2fc8524c6d8d6e865138776a427b02ebbcf9d8be /src/encoder/plugins
parentfc3e0dfcd1a41bec76cb05f937acdb0a818cfd53 (diff)
parent04ed50fb0f94877d8538822d20eaccf65ab40c14 (diff)
Merge tag 'v0.19.15'
release v0.19.15
Diffstat (limited to 'src/encoder/plugins')
-rw-r--r--src/encoder/plugins/WaveEncoderPlugin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/encoder/plugins/WaveEncoderPlugin.cxx b/src/encoder/plugins/WaveEncoderPlugin.cxx
index cf6cd3c54..4311bf96c 100644
--- a/src/encoder/plugins/WaveEncoderPlugin.cxx
+++ b/src/encoder/plugins/WaveEncoderPlugin.cxx
@@ -27,6 +27,8 @@
#include <assert.h>
#include <string.h>
+static constexpr uint16_t WAVE_FORMAT_PCM = 1;
+
struct WaveEncoder {
Encoder encoder;
unsigned bits;
@@ -64,15 +66,15 @@ fill_wave_header(struct wave_header *header, int channels, int bits,
header->id_fmt = ToLE32(0x20746d66);
header->id_data = ToLE32(0x61746164);
- /* wave format */
- header->format = ToLE16(1); // PCM_FORMAT
+ /* wave format */
+ header->format = ToLE16(WAVE_FORMAT_PCM);
header->channels = ToLE16(channels);
header->bits = ToLE16(bits);
header->freq = ToLE32(freq);
header->blocksize = ToLE16(block_size);
header->byterate = ToLE32(freq * block_size);
- /* chunk sizes (fake data length) */
+ /* chunk sizes (fake data length) */
header->fmt_size = ToLE32(16);
header->data_size = ToLE32(data_size);
header->riff_size = ToLE32(4 + (8 + 16) + (8 + data_size));