--- asterisk/channels/chan_oss.c 2003-04-27 23:34:27.000000000 +0200 +++ asterisk.oss/channels/chan_oss.c 2003-05-13 14:06:48.000000000 +0200 @@ -228,8 +227,9 @@ int max; int res; char ign[4096]; - if (read(sounddev, ign, sizeof(sounddev)) < 0) - ast_log(LOG_WARNING, "Read error on sound device: %s\n", strerror(errno)); + if (read(sounddev, ign, sizeof(sounddev)) < 0) { + // ast_log(LOG_WARNING, "Read error on sound device: %s\n", strerror(errno)); + } for(;;) { FD_ZERO(&rfds); FD_ZERO(&wfds); @@ -280,8 +280,8 @@ if (!silencesuppression) return 0; loudness = calc_loudness((short *)(buf)); - if (option_debug) - ast_log(LOG_DEBUG, "loudness is %d\n", loudness); +// if (option_debug) +// ast_log(LOG_NOTICE, "loudness is %d\n", loudness); if (loudness < silencethreshold) { silentframes++; silbufcnt++; @@ -621,15 +621,17 @@ } res = read(sounddev, buf + AST_FRIENDLY_OFFSET + readpos, FRAME_SIZE * 2 - readpos); if (res < 0) { - ast_log(LOG_WARNING, "Error reading from sound device (If you're running 'artsd' then kill it): %s\n", strerror(errno)); +// ast_log(LOG_WARNING, "Error reading from sound device (If you're running 'artsd' then kill it): %s\n", strerror(errno)); #if 0 CRASH; #endif - return NULL; +// return NULL; + return &f; } readpos += res;