-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtestaudio.sh
executable file
·27 lines (20 loc) · 1.77 KB
/
testaudio.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
echo "default"
gst-launch filesrc location="samples/wb_male.wav" ! decodebin ! audioconvert ! alsasink 2>&1 /dev/null > /dev/null
echo "audioamplify amplification=2"
gst-launch filesrc location="samples/wb_male.wav" ! decodebin ! audioconvert ! audioamplify amplification=2 ! alsasink 2>&1 /dev/null > /dev/null
echo "legacyresample ! audio/x-raw-int, rate=8000"
gst-launch filesrc location="samples/wb_male.wav" ! decodebin ! audioconvert ! legacyresample ! audio/x-raw-int, rate=8000 ! alsasink 2>&1 /dev/null > /dev/null
# Mix 2 audio channels
gst-launch -v filesrc location="samples/wb_male.wav" ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! adder name=mix ! alsasink audiotestsrc freq=500 ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! mix.
# Mix 2 audio channels
gst-launch -v adder name=mix ! alsasink \
{ filesrc location="samples/testmale.wav" ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! mix. } \
{ filesrc location="samples/unnatural.mp3" ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! mix. }
# Mix 3 audio channels
gst-launch -v adder name=mix ! alsasink \
{ filesrc location="samples/testmale.wav" ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! mix. } \
{ filesrc location="samples/unnatural.mp3" ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! mix. } \
{ filesrc location="samples/female.wav" ! decodebin ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100,channel=1 ! mix. }
# Analyse spectre (-m pour voir les messages venant du bus)
gst-launch -m autoaudiosrc ! audioconvert ! audioresample ! "audio/x-raw-float,rate=16000" ! spectrum ! autoaudiosink