#!/bin/sh
Volume=`cat function.ini | ./busybox grep "volume:" | ./busybox grep -v grep | sed 's/volume://g' | sed 's/\r//g' | sed 's/\n//g' | sed "s/$(echo -e '\015')//g"`
script_path=`echo $0 | awk -F '/' '{for(i=1;i<NF;i++) printf$i"/"}'`
./simple_adec_bind_ao -r 8000 -t g711a -v $Volume -i audio/start_record.pcm
sleep 0.2
./simple_ai_bind_aenc -r 8000 -c 1 -o audio/audioIn.pcm -t g711a -s 5
echo aenc end
sleep 0.2
./simple_adec_bind_ao -r 8000 -t g711a -v $Volume -i audio/stop_record.pcm
sleep 0.2
./simple_adec_bind_ao -r 8000 -t g711a -v $Volume -i audio/start_play_record.pcm
sleep 0.2
./simple_adec_bind_ao -r 8000 -t g711a -v $Volume -i audio/audioIn.pcm
echo adec end
