summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjmedia/src/pjmedia/pasound.c4
-rw-r--r--pjsip-apps/src/samples/recfile.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/pjmedia/src/pjmedia/pasound.c b/pjmedia/src/pjmedia/pasound.c
index cd28b26b..78f4778c 100644
--- a/pjmedia/src/pjmedia/pasound.c
+++ b/pjmedia/src/pjmedia/pasound.c
@@ -90,7 +90,7 @@ static int PaRecorderCallback(const void *input,
pjmedia_snd_stream *stream = (pjmedia_snd_stream*) userData;
pj_status_t status;
- pj_assert(frameCount == stream->samples_per_frame * stream->channel_count);
+ pj_assert(frameCount * stream->channel_count == stream->samples_per_frame);
PJ_UNUSED_ARG(output);
PJ_UNUSED_ARG(timeInfo);
@@ -140,7 +140,7 @@ static int PaPlayerCallback( const void *input,
unsigned size = frameCount * stream->bytes_per_sample *
stream->channel_count;
- pj_assert(frameCount == stream->samples_per_frame * stream->channel_count);
+ pj_assert(frameCount * stream->channel_count == stream->samples_per_frame);
PJ_UNUSED_ARG(input);
PJ_UNUSED_ARG(timeInfo);
diff --git a/pjsip-apps/src/samples/recfile.c b/pjsip-apps/src/samples/recfile.c
index 1fc68b06..7e8563d3 100644
--- a/pjsip-apps/src/samples/recfile.c
+++ b/pjsip-apps/src/samples/recfile.c
@@ -41,8 +41,8 @@
/* Configs */
#define CLOCK_RATE 44100
-#define SAMPLES_PER_FRAME (CLOCK_RATE * 20 / 1000)
#define NCHANNELS 2
+#define SAMPLES_PER_FRAME (NCHANNELS * (CLOCK_RATE * 10 / 1000))
#define BITS_PER_SAMPLE 16