I think the problem I'll run into is the 128 channel case. I'm hoping for a
general solution... I'm almost positive this will require runtime checks.
Your solution is what I was thinking for functions requiring exactly N
channels (I'm not sure if there are many functions like that).



On Tue, Aug 26, 2008 at 2:11 PM, Henning Thielemann <
[EMAIL PROTECTED]> wrote:

>
> On Mon, 25 Aug 2008, John Van Enk wrote:
>
>  How well would the storablevector package (Data.StorableVector) work for
>> storing audio data? One of the major issues I'm still working over is that
>> I
>> want to maintain something similar to a [[a]] format (since the underlying
>> PortAudio library and hardware could support hundreds of interleaved
>> channels) but I would like to be able to build in some typechecking to the
>> functions to make sure the number of channels matches the nubmer expected
>> in
>> the functions.
>>
>
> With
>  data Stereo a =  Stereo !a !a
>
> you could also use
>  Stereo (Stereo a)
>   for quadrophony and so on. Would this be convenient enough?
>
> StorableVector stores everything of fixed length for which a Storable
> instance is defined.
>



-- 
/jve
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to