summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/say.c14
-rw-r--r--examples/test.c12
-rw-r--r--include/xas/audio.h8
-rw-r--r--src/bank.c2
-rw-r--r--src/riff.c4
-rw-r--r--src/synth.c2
-rw-r--r--src/vox.c2
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,
diff --git a/src/bank.c b/src/bank.c
index 8c17bb3..726de08 100644
--- a/src/bank.c
+++ b/src/bank.c
@@ -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);
diff --git a/src/riff.c b/src/riff.c
index 0184a30..ce788f5 100644
--- a/src/riff.c
+++ b/src/riff.c
@@ -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) {
diff --git a/src/vox.c b/src/vox.c
index 7fec432..3433121 100644
--- a/src/vox.c
+++ b/src/vox.c
@@ -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);