[asterisk-commits] russell: branch russell/jack r93174 - /team/russell/jack/apps/app_jack.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Dec 16 16:15:56 CST 2007
Author: russell
Date: Sun Dec 16 16:15:56 2007
New Revision: 93174
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93174
Log:
fix some silly math errors
Modified:
team/russell/jack/apps/app_jack.c
Modified: team/russell/jack/apps/app_jack.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/apps/app_jack.c?view=diff&rev=93174&r1=93173&r2=93174
==============================================================================
--- team/russell/jack/apps/app_jack.c (original)
+++ team/russell/jack/apps/app_jack.c Sun Dec 16 16:15:56 2007
@@ -59,7 +59,10 @@
static char *jack_synopsis =
"JACK (Jack Audio Connection Kit) Application";
static char *jack_desc =
-"Jcak()\n"
+"Jack()\n"
+" This application takes no arguments. When executed, two jack ports will\n"
+"get created; one input and one output. Other applications can be hooked up\n"
+"to these ports to access the audio coming from, or being sent to the channel.\n"
"";
struct jack_data {
@@ -232,13 +235,15 @@
static void handle_output(void *buf, jack_nframes_t nframes,
struct jack_data *jack_data)
{
- size_t res;
-
- res = jack_ringbuffer_read(jack_data->output_rb, buf, nframes * sizeof(float));
-
- if (res != nframes) {
+ size_t res, len;
+
+ len = nframes * sizeof(float);
+
+ res = jack_ringbuffer_read(jack_data->output_rb, buf, len);
+
+ if (len != res) {
ast_log(LOG_WARNING, "Wanted %d bytes to send to the output port, "
- "but only got %d\n", nframes, res);
+ "but only got %d\n", len, res);
}
}
More information about the asterisk-commits
mailing list