File: test.ml

package info (click to toggle)
ocaml-soundtouch 0.1.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184 kB
  • sloc: cpp: 211; ml: 108; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module S = Soundtouch

let () =
  let chans = 2 in
  let samplerate = 44100 in
  let s = S.make chans samplerate in
  Printf.printf "Sountouch version %s\n\n%!" (S.get_version_string s);
  S.set_rate s 1.2;
  let buflen = 10000 in
  let buf =
    Bigarray.Array1.create Bigarray.float32 Bigarray.c_layout (chans * buflen)
  in
  for _ = 0 to 10 do
    S.put_samples_ba s buf
  done;
  for _ = 0 to 10 do
    ignore (S.get_samples_ba s buf)
  done