mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
test/test_metaflac.sh: POSIXify embedded awk script.
The embedded awk script was using the 'lshift' function which apparently only exists in GNU auk (gawk) and definitely does not exist in mawk. Thanks to Martijn van Beurden <mvanb1@gmail.com> for reporting this issue.
This commit is contained in:
@@ -399,6 +399,7 @@ echo OK
|
||||
|
||||
tonegenerator ()
|
||||
{
|
||||
# When using GAWK, use --lint=posix to identify non-POSIX awk usages.
|
||||
awk -- '
|
||||
BEGIN {
|
||||
samplerate = '$1';
|
||||
@@ -407,7 +408,11 @@ tonegenerator ()
|
||||
duration = 1;
|
||||
bitspersample = 24;
|
||||
|
||||
samplemidpoint = lshift(1, (bitspersample-1));
|
||||
samplemidpoint = 1;
|
||||
for (sps = 0 ; sps < bitspersample - 1 ; sps++) {
|
||||
samplemidpoint *= 2;
|
||||
}
|
||||
|
||||
samplerange = samplemidpoint - 1;
|
||||
|
||||
pi = 4 * atan2(1,1);
|
||||
|
||||
Reference in New Issue
Block a user