test audio via ffmpeg
This commit is contained in:
parent
189b704d1c
commit
ded94daf43
13
drop/ainput
Executable file
13
drop/ainput
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PARAMS="-ac 2 -ar 44000 -f s16le -acodec pcm_mulaw"
|
||||||
|
|
||||||
|
if [ $# != 1 ]
|
||||||
|
then
|
||||||
|
echo "usage: $0 music-file" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILE="$1"
|
||||||
|
|
||||||
|
ffmpeg -loglevel 0 -i ${FILE} ${PARAMS} -
|
13
drop/aoutput
Executable file
13
drop/aoutput
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PARAMS="-ac 2 -ar 44000 -f s16le -acodec pcm_mulaw"
|
||||||
|
|
||||||
|
if [ $# != 1 ]
|
||||||
|
then
|
||||||
|
echo "usage: $0 music-file" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILE="$1"
|
||||||
|
|
||||||
|
ffmpeg ${PARAMS} -i - ${FILE}
|
@ -1,41 +0,0 @@
|
|||||||
#!/bin/dash
|
|
||||||
|
|
||||||
REP=/tmp/ipc/
|
|
||||||
SERVICE="pongd"
|
|
||||||
NB=10
|
|
||||||
# CLEAN UP !
|
|
||||||
if [ $# -ne 0 ] && [ "$1" = clean ]
|
|
||||||
then
|
|
||||||
echo "clean rep ${REP}"
|
|
||||||
rm ${REP}/${SERVICE} 2>/dev/null
|
|
||||||
rm ${REP}/*-in 2>/dev/null
|
|
||||||
rm ${REP}/*-out 2>/dev/null
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -ne 0 ]
|
|
||||||
then
|
|
||||||
NB=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for pid in `seq 1 ${NB}`
|
|
||||||
do
|
|
||||||
# pid index version
|
|
||||||
echo "${pid} 1 1" | nc -U ${REP}${SERVICE}
|
|
||||||
|
|
||||||
# the purpose is to send something in the pipe
|
|
||||||
echo "hello frero" | nc -U ${REP}${pid}-1-1
|
|
||||||
#echo "exit" | nc -U ${REP}${pid}-1-1
|
|
||||||
|
|
||||||
# the service will answer with our message
|
|
||||||
echo "pid : ${pid}"
|
|
||||||
#cat ${REP}/${pid}-1-1-in
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "exit" | nc -U ${REP}${SERVICE}
|
|
||||||
|
|
||||||
echo "clean rep"
|
|
||||||
#rm ${REP}/*
|
|
||||||
#rm ${REP}/*-out
|
|
Reference in New Issue
Block a user