|
From: isikistanbul <isi...@ho...> - 2015-12-08 22:06:26
|
so far, I fixed that problem. (I had to use trim to cut the microphone signal). But still couldn't figure out how to make it go on forever. It stops after few hours ( I let it run at night, in the morning it is already had stopped) here is my new code: while true; do sox -m --input-buffer 512 --single-threaded -r 48000 -t alsa hw:1,0 /media/NASDRIVE2/bow.wav -t alsa hw:0,0 trim 0 362 delay 3 0 ; sudo killall -9 sox; sleep 4; done I get alsa under-run errors repeatedly, could that be the reason that it stops? Could the buffersize might be the reason if this? And what do you mean by output of sox with script(1) ? Do you mean this ? hw:1,0: (alsa) Encoding: Signed PCM Channels: 2 @ 16-bit Samplerate: 48000Hz Replaygain: off Duration: unknown /media/NASDRIVE2/bow.wav: File Size: 69.9M Bit Rate: 1.54M Encoding: Signed PCM Channels: 2 @ 16-bit Samplerate: 48000Hz Replaygain: off Duration: 00:06:04.00 In:0.05% 00:00:00.17 [00:06:03.83] Out:4.10k [ |= ] Clip:0 sox WARN alsa: under-run In:2.63% 00:00:09.56 [00:05:54.44] Out:455k [ -=|== ] Clip:0 sox WARN alsa: under-run In:5.81% 00:00:21.16 [00:05:42.84] Out:1.01M [ -==|== ] Clip:0 Aborted. sox: no process found ^C Thanks Isik -- View this message in context: http://sox.10957.n7.nabble.com/infinite-while-loop-with-m-function-tp5590p5593.html Sent from the SoX mailing list archive at Nabble.com. |