summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia/nullsound.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-16 14:24:26 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-16 14:24:26 +0000
commitc0598144d962fbc8c20482bdc5e00e99ec62f8a9 (patch)
treec7891e82c998f549f375c6a72da822ff5a4fe9db /pjmedia/src/pjmedia/nullsound.c
parent91329274db688fbb43ce0dc80f9174cc82489a48 (diff)
Added misc flags and modify Makefiles to allow exclusion of PortAudio and specific codec during compilation
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@320 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia/nullsound.c')
-rw-r--r--pjmedia/src/pjmedia/nullsound.c49
1 files changed, 37 insertions, 12 deletions
diff --git a/pjmedia/src/pjmedia/nullsound.c b/pjmedia/src/pjmedia/nullsound.c
index fcda5780..ff4e92e7 100644
--- a/pjmedia/src/pjmedia/nullsound.c
+++ b/pjmedia/src/pjmedia/nullsound.c
@@ -19,6 +19,8 @@
#include <pjmedia/sound.h>
#include <pj/assert.h>
+#if defined(PJMEDIA_HAS_NULL_SOUND) && PJMEDIA_HAS_NULL_SOUND!=0
+
static pj_snd_dev_info null_info =
{
"Null Device",
@@ -45,28 +47,48 @@ PJ_DEF(const pj_snd_dev_info*) pj_snd_get_dev_info(unsigned index)
return &null_info;
}
-PJ_DEF(pj_snd_stream*) pj_snd_open_recorder( int index,
- const pj_snd_stream_info *param,
- pj_snd_rec_cb rec_cb,
- void *user_data)
+PJ_DEF(pj_status_t) pj_snd_open_recorder( int index,
+ unsigned clock_rate,
+ unsigned channel_count,
+ unsigned samples_per_frame,
+ unsigned bits_per_sample,
+ pj_snd_rec_cb rec_cb,
+ void *user_data,
+ pj_snd_stream **p_snd_strm)
{
PJ_UNUSED_ARG(index);
- PJ_UNUSED_ARG(param);
+ PJ_UNUSED_ARG(clock_rate);
+ PJ_UNUSED_ARG(channel_count);
+ PJ_UNUSED_ARG(samples_per_frame);
+ PJ_UNUSED_ARG(bits_per_sample);
PJ_UNUSED_ARG(rec_cb);
PJ_UNUSED_ARG(user_data);
- return (void*)1;
+
+ *p_snd_strm = (void*)1;
+
+ return PJ_SUCCESS;
}
-PJ_DEF(pj_snd_stream*) pj_snd_open_player( int index,
- const pj_snd_stream_info *param,
- pj_snd_play_cb play_cb,
- void *user_data)
+PJ_DEF(pj_status_t) pj_snd_open_player( int index,
+ unsigned clock_rate,
+ unsigned channel_count,
+ unsigned samples_per_frame,
+ unsigned bits_per_sample,
+ pj_snd_play_cb play_cb,
+ void *user_data,
+ pj_snd_stream **p_snd_strm )
{
PJ_UNUSED_ARG(index);
- PJ_UNUSED_ARG(param);
+ PJ_UNUSED_ARG(clock_rate);
+ PJ_UNUSED_ARG(channel_count);
+ PJ_UNUSED_ARG(samples_per_frame);
+ PJ_UNUSED_ARG(bits_per_sample);
PJ_UNUSED_ARG(play_cb);
PJ_UNUSED_ARG(user_data);
- return (void*)1;
+
+ *p_snd_strm = (void*)1;
+
+ return PJ_SUCCESS;
}
PJ_DEF(pj_status_t) pj_snd_stream_start(pj_snd_stream *stream)
@@ -91,3 +113,6 @@ PJ_DEF(pj_status_t) pj_snd_deinit(void)
{
return PJ_SUCCESS;
}
+
+
+#endif /* PJMEDIA_HAS_NULL_SOUND */