module Synthesizer.SampleRateContext.Play where import qualified Synthesizer.Basic.Binary as BinSmp import qualified Synthesizer.SampleRateContext.Signal as SigC import qualified Synthesizer.SampleRateContext.Rate as Rate import qualified Synthesizer.Physical.Signal as SigP import qualified Synthesizer.Physical.Play as PlayP import qualified Algebra.OccasionallyScalar as OccScalar import qualified Algebra.VectorSpace as VectorSpace import qualified Algebra.RealField as RealField import qualified Algebra.Field as Field import System.Exit(ExitCode) toInt16 :: (RealField.C t, BinSmp.C yv, Field.C t', OccScalar.C t t', Field.C y', OccScalar.C y y', VectorSpace.C y yv) => t' -> y' -> t' -> (Rate.T t t' -> SigC.T y y' yv) -> IO ExitCode toInt16 freqUnit amp sampleRate proc = PlayP.toInt16 freqUnit amp (SigP.runPlain sampleRate proc)