Permalink
Browse files

Add sound file normalization example

Ignore-this: 368b2fced2c7691fa3a66a8b1878b26a

darcs-hash:20101005114348-15200-4153e48fcb25779d81ffb4a1d845bd36cb1f5311.gz
  • Loading branch information...
1 parent eee51d1 commit 9018d21f30e48c9a942f0e6db9c91c4f6f9dfac4 Stefan Kersten committed Oct 5, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 examples/normalize.hs
View
@@ -0,0 +1,14 @@
+module Main where
+
+import qualified Sound.File.Sndfile.Buffer.StorableVector.Examples as StorableVector
+import qualified Sound.File.Sndfile.Buffer.Vector.Examples as Vector
+import System.Environment
+
+main = do
+ (inFile:outFile:args) <- getArgs
+ let f = case args of
+ ["StorableVector"] -> StorableVector.normalizeSoundFile
+ ["Vector"] -> Vector.normalizeSoundFile
+ [] -> Vector.normalizeSoundFile
+ (x:_) -> fail $ "Invalid buffer interface " ++ x
+ f inFile outFile

0 comments on commit 9018d21

Please sign in to comment.