]> git.0d.be Git - pige-extractor.git/commitdiff
add support for ?norm=0 in query string, to normalize to 0dB
authorFrédéric Péters <fpeters@0d.be>
Sun, 15 May 2016 14:22:12 +0000 (16:22 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 15 May 2016 14:22:12 +0000 (16:22 +0200)
download.cgi

index b8b5d5f0df0188b321e46031358c389233b22f49..dc9cfdd44598fb87c3ebe7cfe3f3fec2d761b483 100755 (executable)
@@ -159,6 +159,11 @@ if cgi_params.get('fade'): # fade duration, ex: 0.2
     command.append(cgi_params.get('fade')[0])
     command.append('0') # apply fade to both start and end
 
+if cgi_params.get('norm'): # normalize
+    command.append('gain')
+    command.append('-n')
+    command.append(cgi_params.get('norm')[0])
+
 if '--test' in sys.argv:
     print ' '.join(command)
 else: