setup/destination: frequency
This commit is contained in:
parent
81b7f8b247
commit
b4d7c9d9f0
@ -354,11 +354,37 @@ setupDestination() {
|
||||
comeagain
|
||||
destinationchannels["$destination"]=$value
|
||||
cat <<-EODesc
|
||||
|
||||
Sampling rate (Hertz, integer):
|
||||
Files will be resampled as needed to the specified sampling-rate.
|
||||
Shoutcast/Icecast streams require a constant sampling-rate.
|
||||
Telephony systems often require a sampling-rate of 8000Hz.
|
||||
EODesc
|
||||
if [[ ${destinationformat["$destination"]} == opus ]]
|
||||
then
|
||||
cat <<-EODesc
|
||||
|
||||
Please note that Opus supports only the following sample-rates:
|
||||
8000, 12000, 16000, 24000, and 48000 Hz. So don't set
|
||||
resampling on an Opus destination to any other value or files
|
||||
will be resampled twice.
|
||||
EODesc
|
||||
fi
|
||||
comeagain() {
|
||||
:
|
||||
read \
|
||||
-e \
|
||||
${destinationfrequency["$destination"]+-i${destinationfrequency["$destination"]}}\
|
||||
-p'Sampling-rate: ' \
|
||||
value
|
||||
if ! [[ $value =~ $expr ]]
|
||||
then
|
||||
echo "Invalid frequency value: $value" >&2
|
||||
comeagain
|
||||
fi
|
||||
unset expr
|
||||
}
|
||||
comeagain
|
||||
destinationfrequency["$destination"]=$value
|
||||
cat <<-EODesc
|
||||
EODesc
|
||||
comeagain() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user