summaryrefslogtreecommitdiff
path: root/modules/winwave
diff options
context:
space:
mode:
Diffstat (limited to 'modules/winwave')
-rw-r--r--modules/winwave/play.c6
-rw-r--r--modules/winwave/src.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/winwave/play.c b/modules/winwave/play.c
index b9129fa..e987fc7 100644
--- a/modules/winwave/play.c
+++ b/modules/winwave/play.c
@@ -202,6 +202,12 @@ int winwave_play_alloc(struct auplay_st **stp, const struct auplay *ap,
if (!stp || !ap || !prm)
return EINVAL;
+ if (prm->fmt != AUFMT_S16LE) {
+ warning("winwave: playback: unsupported sample format (%s)\n",
+ aufmt_name(prm->fmt));
+ return ENOTSUP;
+ }
+
st = mem_zalloc(sizeof(*st), auplay_destructor);
if (!st)
return ENOMEM;
diff --git a/modules/winwave/src.c b/modules/winwave/src.c
index e96915e..6240899 100644
--- a/modules/winwave/src.c
+++ b/modules/winwave/src.c
@@ -201,6 +201,12 @@ int winwave_src_alloc(struct ausrc_st **stp, const struct ausrc *as,
if (!stp || !as || !prm)
return EINVAL;
+ if (prm->fmt != AUFMT_S16LE) {
+ warning("winwave: source: unsupported sample format (%s)\n",
+ aufmt_name(prm->fmt));
+ return ENOTSUP;
+ }
+
st = mem_zalloc(sizeof(*st), ausrc_destructor);
if (!st)
return ENOMEM;