Module rsynth::backend::combined[][src]

Combine different back-ends for audio input, audio output and midi input, mostly for offline rendering and testing.

Support is only enabled if rsynth is compiled with the backend-combined feature, see the cargo reference for more information on setting cargo features.

The run function can be used to run a plugin and read audio and midi from the inputs and write audio and midi to the outputs.

Currently, the following inputs and outputs are available:

Note that, when compiled with the backend-combined-wav feature, AudioChunkReader implements From<(Header, BitDepth)> (Header and BitDepth are from the wav crate) to ease integration with the wav crate.

Modules

dummy

Dummy backend that does nothing, useful for testing.

hound

Backend for reading and writing .wav files, based on the hound crate.

memory

In-memory backend, useful for testing.

midly

Read midi files.

Structs

MidiWriterWrapper

A wrapper around a midi writer that implements EventHandler<Timed<RawMidiEvent>> by queueing the events, which can then be written to the encapsulated MidiWriter by calling step_frames.

TestAudioReader

An audio reader, useful for testing.

TestAudioWriter

An audio writer, useful for testing.

TestMidiReader

A midi reader, useful for testing.

TestMidiWriter

A midi writer, useful for testing.

Enums

CombinedError

The error type that represents the errors you can get from the run function.

Constants

MICROSECONDS_PER_SECOND

Traits

AudioReader

Define how audio is read.

AudioWriter

Define how audio is written.

MidiWriter

Define how midi is written. Note: there is no “MidiReader”; we use Iterator<Item = DeltaEvent<RawMidiEvent>> for that.

Functions

run

Run an audio renderer with the given audio input, audio output, midi input and midi output.