summaryrefslogtreecommitdiff
path: root/src/wav.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wav.h')
-rw-r--r--src/wav.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/wav.h b/src/wav.h
index ddb37dd..484c6da 100644
--- a/src/wav.h
+++ b/src/wav.h
@@ -42,11 +42,13 @@ typedef struct {
} wav_fmt_chunk_t;
#pragma pack(pop)
-/// Load WAV data from wav_file. Data will be allocated on arena
+/// Load WAV data from wav_file. Data will be allocated on arena, with allocation
+/// size aligned up to align_up_memoryn.
wav_data_t load_wav_file(smrt_arena_t * arena ,
FILE *wav_file ,
wav_master_chunk_t *master_o ,
- wav_fmt_chunk_t *format_o);
+ wav_fmt_chunk_t *format_o ,
+ u64 align_up_memoryn);
/// Write WAV headers and data to wav_file.
b32 write_wav_file(FILE * wav_file ,
@@ -64,9 +66,10 @@ void wav_load(smrt_arena_t *arena, FILE *wav, f64 *** samples_o
u16 *channel_count_o ,
u64 * sample_count_o ,
u32 * sample_rate_o ,
+ u64 align_up_memoryn ,
smrt_arena_t **conflicts, u64 num_conflicts );
-f64 * read_8bps_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel);
-f64 * read_16bps_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel);
-f64 * read_24bps_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel);
-f64 *read_32bps_float_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel);
+f64 * read_8bps_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel, u64 align_up_memoryn);
+f64 * read_16bps_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel, u64 align_up_memoryn);
+f64 * read_24bps_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel, u64 align_up_memoryn);
+f64 *read_32bps_float_data(smrt_arena_t *arena, wav_data_t data, u16 num_channels, u16 channel, u64 align_up_memoryn);