diff options
-rw-r--r-- | examples/say.c | 14 | ||||
-rw-r--r-- | examples/test.c | 12 | ||||
-rw-r--r-- | include/xas/audio.h | 8 | ||||
-rw-r--r-- | src/bank.c | 2 | ||||
-rw-r--r-- | src/riff.c | 4 | ||||
-rw-r--r-- | src/synth.c | 2 | ||||
-rw-r--r-- | src/vox.c | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/examples/say.c b/examples/say.c index 389e338..23b31a2 100644 --- a/examples/say.c +++ b/examples/say.c @@ -87,7 +87,7 @@ int main(int argc, char **argv) { } if ((vox = xas_vox_new("/usr/bin/text2wave", - XAS_AUDIO_STREAM_PCM_16_BIT, + XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size, NULL)) == NULL) { @@ -95,8 +95,8 @@ int main(int argc, char **argv) { } if ((output = xas_riff_new_file(argv[1], - XAS_AUDIO_STREAM_STEREO, - XAS_AUDIO_STREAM_PCM_16_BIT, + XAS_AUDIO_STEREO, + XAS_AUDIO_PCM_16_BIT, sample_rate, O_WRONLY | O_CREAT | O_TRUNC)) == NULL) { goto error_riff_new_file; @@ -106,7 +106,7 @@ int main(int argc, char **argv) { goto error_vox_stream_new; } - if ((synth_l = xas_synth_new(XAS_AUDIO_STREAM_PCM_16_BIT, + if ((synth_l = xas_synth_new(XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size, (xas_synth_callback_sample)sine_sample, @@ -115,7 +115,7 @@ int main(int argc, char **argv) { goto error_synth_new_l; } - if ((synth_r = xas_synth_new(XAS_AUDIO_STREAM_PCM_16_BIT, + if ((synth_r = xas_synth_new(XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size, (xas_synth_callback_sample)sine_sample, @@ -124,8 +124,8 @@ int main(int argc, char **argv) { goto error_synth_new_r; } - if ((mixer = xas_mixer_new(XAS_AUDIO_STREAM_STEREO, - XAS_AUDIO_STREAM_PCM_16_BIT, + if ((mixer = xas_mixer_new(XAS_AUDIO_STEREO, + XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size)) == NULL) { goto error_mixer_new; diff --git a/examples/test.c b/examples/test.c index 779434c..24e6ba1 100644 --- a/examples/test.c +++ b/examples/test.c @@ -83,14 +83,14 @@ int main(int argc, char **argv) { } if ((wave = xas_riff_new_file(argv[1], - XAS_AUDIO_STREAM_STEREO, - XAS_AUDIO_STREAM_PCM_16_BIT, + XAS_AUDIO_STEREO, + XAS_AUDIO_PCM_16_BIT, sample_rate, O_WRONLY | O_CREAT | O_TRUNC)) == NULL) { goto error_riff_new_file; } - if ((synth_l = xas_synth_new(XAS_AUDIO_STREAM_PCM_16_BIT, + if ((synth_l = xas_synth_new(XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size, (xas_synth_callback_sample)sine_sample, @@ -99,7 +99,7 @@ int main(int argc, char **argv) { goto error_synth_new_l; } - if ((synth_r = xas_synth_new(XAS_AUDIO_STREAM_PCM_16_BIT, + if ((synth_r = xas_synth_new(XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size, (xas_synth_callback_sample)sine_sample, @@ -108,8 +108,8 @@ int main(int argc, char **argv) { goto error_synth_new_r; } - if ((mixer = xas_mixer_new(XAS_AUDIO_STREAM_STEREO, - XAS_AUDIO_STREAM_PCM_16_BIT, + if ((mixer = xas_mixer_new(XAS_AUDIO_STEREO, + XAS_AUDIO_PCM_16_BIT, sample_rate, buffer_size)) == NULL) { goto error_mixer_new; diff --git a/include/xas/audio.h b/include/xas/audio.h index 8d4469d..5a92a50 100644 --- a/include/xas/audio.h +++ b/include/xas/audio.h @@ -4,11 +4,11 @@ #include <stdint.h> #include <sys/types.h> -#define XAS_AUDIO_STREAM_PCM_8_BIT 1 -#define XAS_AUDIO_STREAM_PCM_16_BIT 2 +#define XAS_AUDIO_PCM_8_BIT 1 +#define XAS_AUDIO_PCM_16_BIT 2 -#define XAS_AUDIO_STREAM_MONO 1 -#define XAS_AUDIO_STREAM_STEREO 2 +#define XAS_AUDIO_MONO 1 +#define XAS_AUDIO_STEREO 2 enum xas_audio_stream_type { XAS_AUDIO_STREAM_SINK, @@ -102,7 +102,7 @@ xas_audio_stream *xas_bank_stream_new(xas_bank *bank) { return xas_audio_stream_new_source((xas_audio_fill)bank_fill, (xas_audio_cleanup)bank_cleanup, bank, - XAS_AUDIO_STREAM_MONO, + XAS_AUDIO_MONO, bank->sample_size, bank->sample_rate, bank->entry_size); @@ -143,8 +143,8 @@ static int wave_header_parse(xas_riff *riff, } switch (header->wave.channels) { - case XAS_AUDIO_STREAM_MONO: - case XAS_AUDIO_STREAM_STEREO: + case XAS_AUDIO_MONO: + case XAS_AUDIO_STEREO: break; default: diff --git a/src/synth.c b/src/synth.c index 2e77748..6dd14ea 100644 --- a/src/synth.c +++ b/src/synth.c @@ -45,7 +45,7 @@ xas_audio_stream *xas_synth_new(size_t sample_size, if ((stream = xas_audio_stream_new_source((xas_audio_fill)synth_fill, (xas_audio_cleanup)synth_cleanup, synth, - XAS_AUDIO_STREAM_MONO, + XAS_AUDIO_MONO, sample_size, sample_rate, buffer_size)) == NULL) { @@ -275,7 +275,7 @@ xas_audio_stream *xas_vox_stream_new(xas_vox *vox) { return xas_audio_stream_new_source((xas_audio_fill)vox_fill, (xas_audio_cleanup)vox_cleanup, vox, - XAS_AUDIO_STREAM_MONO, + XAS_AUDIO_MONO, vox->sample_size, vox->sample_rate, vox->buffer_size); |