X-Git-Url: https://scm.cri.mines-paristech.fr/git/Faustine.git/blobdiff_plain/d204fe8a60e0556b0294e17c5c6948cb6cee7d91..60771194f4808507a435db7c201e3e75675986be:/interpretor/faustio.ml diff --git a/interpretor/faustio.ml b/interpretor/faustio.ml index 8518b5b..7df74a6 100644 --- a/interpretor/faustio.ml +++ b/interpretor/faustio.ml @@ -24,13 +24,13 @@ class virtual io = _basename <- basename; _dir <- dir method virtual read : string array -> beam - method virtual write : rate array -> float array array array -> string array + method virtual write : rate array -> data -> string array - method private concat : float array array array -> float array array = - fun (origin : float array array array) -> + method private concat : data -> matrix = + fun (origin : data) -> Array.map Array.concat (Array.map Array.to_list origin) - method private channels : float array array array -> int array = + method private channels : data -> int array = fun data -> let get_channel = fun s -> let l = Array.length s in @@ -66,9 +66,9 @@ class waveio : io_type = array_map2 (new signal) rates (Array.map stream2func containers) in new beam signals - method write : rate array -> float array array array -> string array = + method write : rate array -> data -> string array = fun (rates : rate array) -> - fun (output : float array array array) -> + fun (output : data) -> let n = Array.length output in let paths = Array.init n (fun i -> _dir ^ _basename ^ (string_of_int (i + 1)) ^ ".wav") in @@ -121,9 +121,9 @@ class csvio : io_type = let signals = Array.map self#csvread files in new beam signals - method write : rate array -> float array array array -> string array = + method write : rate array -> data -> string array = fun (rates : rate array) -> - fun (data : float array array array) -> + fun (data : data) -> let paths = let n = Array.length data in let path_pattern = fun i -> @@ -185,9 +185,9 @@ class iomanager = wave#set _dir _basename; csv#set _dir _basename - method write : rate array -> float array array array -> string array = + method write : rate array -> data -> string array = fun (rates : rate array) -> - fun (data : float array array array) -> + fun (data : data) -> if _format = "" then raise (Invalid_argument "output format unset.") else if _format = "wav" then