File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -244,19 +244,24 @@ record() {
244
244
-af ' silenceremove=1:0:-50dB' \
245
245
-ab $AUDIO_BITRATE \
246
246
" $audioFile " 1> /dev/null &
247
+ echo " $! " >> " $recordingToggle "
247
248
248
249
if [[ " $LANG " == en* ]]; then
249
250
notify-send --hint=int:transient:1 -t 500 -u normal " Recording started..."
250
251
fi
251
252
if [[ " $LANG " == ja* ]]; then
252
253
notify-send --hint=int:transient:1 -t 500 -u normal " 録音しています..."
253
254
fi
254
-
255
- echo " Started recording."
256
255
else
257
- local -r audioFile=" $( cat " $recordingToggle " ) "
256
+ local audioFile=" $( sed -n " 1p" " $recordingToggle " ) "
257
+ local pid=" $( sed -n " 2p" " $recordingToggle " ) "
258
+
258
259
rm " $recordingToggle "
259
- killall ffmpeg
260
+ kill -15 " $pid "
261
+
262
+ while [ $( du $audioFile | awk ' { print $1 }' ) -eq 0 ]; do
263
+ true
264
+ done
260
265
store_file " ${audioFile} "
261
266
update_sound " $( basename -- " $audioFile " ) "
262
267
You can’t perform that action at this time.
0 commit comments