Internals
PortAudio.Buffer
PortAudio.Messenger
PortAudio.SampledSignalsReader
PortAudio.SampledSignalsWriter
PortAudio.Scribe
PortAudio.get_input_type
PortAudio.get_output_type
PortAudio.read_buffer!
PortAudio.write_buffer
PortAudio.Buffer
— Typestruct PortAudio.Buffer{Sample}
A PortAudio.Buffer
contains everything you might need to read or write data from or to PortAudio. The data
field contains the raw data in the buffer. Use PortAudio.write_buffer
to write data to PortAudio, and PortAudio.read_buffer!
to read data from PortAudio.
PortAudio.Messenger
— TypeMessenger{Sample, Scribe, Input, Output}
A struct
with entries
device_name::String
buffer::Buffer{Sample}
scribe::Scribe
input_channel::Channel{Input}
output_channel::Channel{Output}
The messenger will send tasks to the scribe; the scribe will read/write from the buffer.
PortAudio.SampledSignalsReader
— Typestruct PortAudio.SampledSignalsReader
A PortAudio.Scribe
that will use the SampledSignals
package to manage reading data from PortAudio.
PortAudio.SampledSignalsWriter
— Typestruct PortAudio.SampledSignalsReader
A PortAudio.Scribe
that will use the SampledSignals
package to manage writing data to PortAudio.
PortAudio.Scribe
— Typeabstract type PortAudio.Scribe end
A scribe must implement the following:
- A method for
PortAudio.get_input_type
- A method for
PortAudio.get_output_type
- A method to call itself on two arguments: a
PortAudio.Buffer
and an input of the input type. This method must return an output of the output type. This method should make use ofPortAudio.read_buffer!
andPortAudio.write_buffer
.
PortAudio.get_input_type
— MethodPortAudio.get_input_type(scribe::PortAudio.Scribe, Sample)
Get the input type of a PortAudio.Scribe
for samples of type Sample
.
PortAudio.get_output_type
— MethodPortAudio.get_input_type(scribe::PortAudio.Scribe, Sample)
Get the output type of a PortAudio.Scribe
for samples of type Sample
.
PortAudio.read_buffer!
— FunctionPortAudio.read_buffer!(buffer::Buffer, use_frames = buffer.frames_per_buffer; acquire_lock = true)
Read a number of frames (use_frames
) from PortAudio to a PortAudio.Buffer
.
Set acquire_lock = false
to skip acquiring the acquire_lock.
PortAudio.write_buffer
— FunctionPortAudio.write_buffer(buffer, use_frames = buffer.frames_per_buffer; acquire_lock = true)
Write a number of frames (use_frames
) from a PortAudio.Buffer
to PortAudio.
Set acquire_lock = false
to skip acquiring the lock.