Skip to content
Browse files

tool: use SampleRateType for --variable

  • Loading branch information...
1 parent 83daa03 commit 054e841a7bfc8bc758a2d1fca5f1f39083037454 @kfish committed Dec 23, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 tools/texture-synthesis.hs
View
8 tools/texture-synthesis.hs
@@ -26,7 +26,7 @@ data Config = Config
{ noRaw :: Bool
, delta :: Bool
, zlib :: Bool
- , variable :: Bool
+ , srType :: SampleRateType
, intData :: Bool
, label :: ByteString
, rate :: Integer
@@ -43,7 +43,7 @@ defConfig = Config
{ noRaw = False
, delta = False
, zlib = False
- , variable = False
+ , srType = ConstantSR
, intData = False
, label = "texture"
, rate = 1000
@@ -109,7 +109,7 @@ processConfig = foldM processOneOption
processOneOption config ZLib = do
return $ config {zlib = True}
processOneOption config Variable = do
- return $ config {variable = True}
+ return $ config {srType = VariableSR}
processOneOption config IntData = do
return $ config {intData = True}
processOneOption config (Label s) = do
@@ -159,6 +159,7 @@ texWriteFile Config{..} (path:_) = do
where
rate' = fromInteger rate
sW = setWatermark track wmLevel
+ variable = srType == VariableSR
------------------------------------------------------------
@@ -199,6 +200,7 @@ texWriteFile1d Config{..} (path:_) = do
where
rate' = fromInteger rate
sW = setWatermark track wmLevel
+ variable = srType == VariableSR
------------------------------------------------------------
-- The Application

0 comments on commit 054e841

Please sign in to comment.
Something went wrong with that request. Please try again.