Documentation ¶
Overview ¶
Package render holds various mlsic.Renderer implementations. It should be used along top package compositional algos.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aiff ¶
type Aiff struct { // Filepath `/path/to/directory` where the file should be saved. Filepath string }
Aiff holds relevant information for encoding and saving .aiff files out of audio.PCMBuffer.
type PortAudio ¶
type PortAudio struct { // Latency is part of the portaudio.StreamDeviceParameters. Latency time.Duration // OutputDevice is the device to be used. OutputDevice *portaudio.DeviceInfo // BufferSize is part of the portaudio.StreamDeviceParameters. BufferSize int }
PortAudio implements mlsic.Renderer and holds all necessary dependencies for setting up PortAudio.
func NewPortAudio ¶
func NewPortAudio(opts ...PortAudioOption) (pa *PortAudio, err error)
NewPortAudio will try to initialize with a portaudio.DefaultOutputDevice() with the default buffer size set at 512 abd latency 10.
type PortAudioOption ¶
type PortAudioOption func(*PortAudio)
PortAudioOption if a custom type function that accepts *PortAudio and is used WithXXX PortAudio options functions.
func WithBufferSize ¶
func WithBufferSize(customSize int) PortAudioOption
WithBufferSize sets PortAudio's buffer size.
func WithLatency ¶
func WithLatency(latency time.Duration) PortAudioOption
WithLatency sets PortAudio's latency.
func WithOutputDevice ¶
func WithOutputDevice(device *portaudio.DeviceInfo) PortAudioOption
WithOutputDevice set custom output device.