package llama
Language for Live Audio Module Arrangement
Install
Dune Dependency
Authors
Maintainers
Sources
0.0.1_rust-deps-vendored.tar.gz
sha256=2fb4da5b4478409118b6267f26c0c7f64f10c85d02cbb73c8ead648fc430e860
sha512=ab238268cf22fbb62d5955f849b1837bbee4a12470dde29feb0bf5237023daf01ce6d52dfad30e871948bde13b18808376d254dee90bfeeb82a8c2619d459a8f
doc/src/llama.low_level/llama_low_level.ml.html
Source file llama_low_level.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
module System = struct external env_logger_init_raw : unit -> unit = "env_logger_init" let is_initialized = ref false let env_logger_init () = if not !is_initialized then ( is_initialized := true; env_logger_init_raw ()) end module Wav = struct external read_wav_file_mono_exn_raw : string -> float array = "read_wav_file_mono" let read_wav_file_mono_exn path = (* TODO: This array can't be indexed with [Array.get] but values can be obtained with (say) [Array.iter]. This is possibly a bug in the ocaml rust bindings for the [float array] special case. *) let broken_array = read_wav_file_mono_exn_raw path in Array.of_list (Array.to_list broken_array) end module Output_stream = struct type t external create_with_downsample_32 : int32 -> t = "create_output_stream_with_downsample" let create_with_downsample downsample = create_with_downsample_32 (Int32.of_int downsample) external sample_rate_hz_32 : t -> int32 = "sample_rate_hz" let sample_rate_hz t = sample_rate_hz_32 t |> Int32.to_int external num_channels_32 : t -> int32 = "num_channels" let num_channels t = num_channels_32 t |> Int32.to_int external set_buffer_padding_32 : t -> int32 -> unit = "set_buffer_padding" let set_buffer_padding t buffer_padding = set_buffer_padding_32 t (Int32.of_int buffer_padding) external samples_behind_32 : t -> int32 = "samples_behind" let samples_behind t = samples_behind_32 t |> Int32.to_int external send_sample : t -> float -> unit = "send_sample" end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>