diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-02-09 11:50:07 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-02-09 11:50:07 +0100 |
commit | 98bf08bdcf2edd9d397f32650a8bfe62186fbecf (patch) | |
tree | ebc6ec71f44bff8c42e4eefced61948623df02fc /modules/winwave/winwave.c | |
parent | e6ad5cf4401b860ba402d4b7b3c7c254bc87a019 (diff) |
baresip 0.4.10
Diffstat (limited to 'modules/winwave/winwave.c')
-rw-r--r-- | modules/winwave/winwave.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/winwave/winwave.c b/modules/winwave/winwave.c new file mode 100644 index 0000000..141fbfc --- /dev/null +++ b/modules/winwave/winwave.c @@ -0,0 +1,55 @@ +/** + * @file winwave.c Windows sound driver + * + * Copyright (C) 2010 Creytiv.com + */ +#include <re.h> +#include <rem.h> +#include <windows.h> +#include <mmsystem.h> +#include <baresip.h> +#include "winwave.h" + + +#define DEBUG_MODULE "winwave" +#define DEBUG_LEVEL 5 +#include <re_dbg.h> + + +static struct ausrc *ausrc; +static struct auplay *auplay; + + +static int ww_init(void) +{ + int play_dev_count, src_dev_count; + int err; + + play_dev_count = waveOutGetNumDevs(); + src_dev_count = waveInGetNumDevs(); + + info("winwave: output devices: %d, input devices: %d\n", + play_dev_count, src_dev_count); + + err = ausrc_register(&ausrc, "winwave", winwave_src_alloc); + err |= auplay_register(&auplay, "winwave", winwave_play_alloc); + + return err; +} + + +static int ww_close(void) +{ + ausrc = mem_deref(ausrc); + auplay = mem_deref(auplay); + + return 0; +} + + +EXPORT_SYM const struct mod_export DECL_EXPORTS(winwave) = { + "winwave", + "sound", + ww_init, + ww_close +}; |