aboutsummaryrefslogtreecommitdiff
path: root/utils/midiplay/wave_writer.h
blob: 17318c34af2b01da5f90ea2e92aa35997bcdd78b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* WAVE sound file writer for recording 16-bit output during program development */

#pragma once
#ifndef WAVE_WRITER_H
#define WAVE_WRITER_H

#ifdef __cplusplus
extern "C" {
#endif

int wave_open(long sample_rate, const char *filename);
void wave_enable_stereo(void);
void wave_write(short const *in, long count);
long wave_sample_count(void);
void wave_close(void);

void *ctx_wave_open(long sample_rate, const char *filename);
void ctx_wave_enable_stereo(void *ctx);
void ctx_wave_write(void *ctx, short const *in, long count);
long ctx_wave_sample_count(void *ctx);
void ctx_wave_close(void *ctx);

#ifdef __cplusplus
}
#endif

#endif