| Fix iaxrecord so that it doesnt record rings - previous patch is not necessary … | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 72d086e74af1fc956e851c7a27e000685c52c17a | |
| parent 6b0626b2db5bb3e7bc048b961a32de39c56fe929 | |
| Author: HD Moore <[email protected]> | |
| Date: Mon, 25 May 2009 22:16:26 +0000 | |
| Fix iaxrecord so that it doesnt record rings - previous patch is not necessary … | |
| Diffstat: | |
| M src/iaxrecord/iaxrecord.c | 18 +++--------------- | |
| 1 file changed, 3 insertions(+), 15 deletions(-) | |
| --- | |
| diff --git a/src/iaxrecord/iaxrecord.c b/src/iaxrecord/iaxrecord.c | |
| @@ -29,7 +29,6 @@ int audio = 0; | |
| int busy = 0; | |
| int fail = 1; | |
| int done = 0; | |
| -int ansd = 0; | |
| float silence_threshold = 0.0f; | |
| int call_state = 0; | |
| @@ -91,20 +90,11 @@ int state_event_callback(struct iaxc_ev_call_state call) { | |
| int audio_event_callback( struct iaxc_ev_audio audio) { | |
| - /* We have been recording rings, dump the file and reopen */ | |
| - if(call_trace != -1 && !fail && !ansd) { | |
| - close(call_trace); | |
| - unlink(iax_out); | |
| - call_trace = -1; | |
| - call_bytes = 0; | |
| - ansd = 1; | |
| - } | |
| - | |
| - if(call_trace == -1) { | |
| + if(call_trace == -1 && !fail) { | |
| call_trace = open(iax_out, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S… | |
| } | |
| - | |
| - if(call_trace != -1){ | |
| + | |
| + if(call_trace != -1) { | |
| if(debug) printf("audio data: format=%d encoded=%d size=%d sta… | |
| write(call_trace, audio.data, audio.size); | |
| call_bytes += audio.size; | |
| @@ -264,8 +254,6 @@ int main(int argc, char **argv) { | |
| if(! etime) time(&etime); | |
| - if(call_bytes > 0 && fail == 1) fail = 0; | |
| - | |
| fprintf(stdout, "COMPLETED %s BYTES=%d FILE=%s FAIL=%d BUSY=%d RINGTIM… | |
| iax_num, | |
| call_bytes, |