Tportaudio.Buffer
Audio buffers.
val length : ('a, 'b) array -> int
length
is Bigarray
.Array1.dim.
val get : ('a, 'b) array -> int -> 'a
get
is Bigarray
.Array1.get
val set : ('a, 'b) array -> int -> 'a -> unit
set
is Bigarray
.Array1.set
The type for specifying how frames are laid out in buffers. See data
.
val create :
channel_count:int ->
('a, 'b) sample_format ->
layout ->
frame_count:int ->
('a, 'b) t
create ~channel_count sf layout ~frame_count
is a buffer of frame_count
frames for channel_count
channels of sample format sf
laid out according to layout
(see data
) and initially filled with zero_sample
.
val channel_count : ('a, 'b) t -> int
channel_count b
is the number of channels in b
.
val sample_format : ('a, 'b) t -> ('a, 'b) sample_format
sample_format b
is the sample format of b
.
val frame_count : ('a, 'b) t -> int
frame_count b
is the number of frames in b
.
data b
is d
the data of buffer b
. If the layout of b
is
`Interleaved
the resulting array has a single element. The sample of channel c
at frame f
is given at get d.(0) (f * channel_count + c)
.`Planar
, the resulting array one element per channel. The sample of channel c
at frame f
is given at get d.(c) f
.