Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NativeSynth ¶ added in v0.3.0
func (*NativeSynth) Release ¶ added in v0.3.0
func (bridgesynth *NativeSynth) Release(voice int)
Release is part of C.Synths' implementation of sointu.Synth interface
func (*NativeSynth) Render ¶ added in v0.3.0
func (bridgesynth *NativeSynth) Render(buffer sointu.AudioBuffer, maxtime int) (int, int, error)
Render renders until the buffer is full or the modulated time is reached, whichever happens first. Parameters:
buffer float32 slice to fill with rendered samples. Stereo signal, so should have even length. maxtime how long nominal time to render in samples. Speed unit might modulate time so the actual number of samples rendered depends on the modulation and if buffer is full before maxtime is reached.
Returns a tuple (int, int, error), consisting of:
samples number of samples rendered in the buffer time how much the time advanced error potential error
In practice, if nsamples = len(buffer)/2, then time <= maxtime. If maxtime was reached first, then nsamples <= len(buffer)/2 and time >= maxtime. Note that it could happen that time > maxtime, as it is modulated and the time could advance by 2 or more, so the loop exit condition would fire when the time is already past maxtime. Under no conditions, nsamples >= len(buffer)/2 i.e. guaranteed to never overwrite the buffer.
func (*NativeSynth) Trigger ¶ added in v0.3.0
func (bridgesynth *NativeSynth) Trigger(voice int, note byte)
Trigger is part of C.Synths' implementation of sointu.Synth interface
type NativeSynther ¶ added in v0.3.0
type NativeSynther struct { }
type RenderError ¶
type RenderError struct {
// contains filtered or unexported fields
}
Render error stores the exact errorcode, which is actually just the x87 FPU flags, with only the critical failure flags masked. Useful if you are interested exactly what went wrong with the patch.
func (*RenderError) Error ¶
func (e *RenderError) Error() string