![]() |
Gondwana Game Engine Development (master) - 2.7.0
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Renders a finite MIDI timeline to interleaved stereo samples, with optional looping and seeking. More...
Public Member Functions | |
| SynthesizerSampleProvider (MidiFileSequencer sequencer, Synthesizer synth, MeltySynth.MidiFile midiFile, bool loop) | |
| Wraps a sequencer that has already started the supplied MIDI file at its beginning. | |
| int | Read (float[] buffer, int offset, int count) |
| Reads complete stereo frames; returns zero at EOF, including on subsequent reads. | |
| void | Seek (TimeSpan time) |
| Seeks within the timeline, retaining synthesizer state for forward seeks. | |
Properties | |
| WaveFormat | WaveFormat [get] |
| Gets the synthesizer's sample rate as stereo IEEE float audio. | |
Renders a finite MIDI timeline to interleaved stereo samples, with optional looping and seeking.
Definition at line 7 of file SynthesiserSampleProvider.cs.
| Gondwana.Audio.Midi.SynthesizerSampleProvider.SynthesizerSampleProvider | ( | MidiFileSequencer | sequencer, |
| Synthesizer | synth, | ||
| MeltySynth.MidiFile | midiFile, | ||
| bool | loop ) |
Wraps a sequencer that has already started the supplied MIDI file at its beginning.
| sequencer | The sequencer controlling MIDI event timing. |
| synth | The synthesizer used by the sequencer. |
| midiFile | The MIDI timeline to render. |
| loop | Whether to restart at the end of the authored timeline. |
Definition at line 24 of file SynthesiserSampleProvider.cs.
| int Gondwana.Audio.Midi.SynthesizerSampleProvider.Read | ( | float[] | buffer, |
| int | offset, | ||
| int | count ) |
Reads complete stereo frames; returns zero at EOF, including on subsequent reads.
| buffer | Destination for interleaved stereo samples. |
| offset | First destination sample. |
| count | Maximum individual samples, rounded down to complete frames. |
Silence is music data, not an end marker. Leading and internal rests are preserved.
Definition at line 47 of file SynthesiserSampleProvider.cs.
| void Gondwana.Audio.Midi.SynthesizerSampleProvider.Seek | ( | TimeSpan | time | ) |
Seeks within the timeline, retaining synthesizer state for forward seeks.
| time | Target time, clamped to the authored duration. |
MeltySynth must render intervening samples to reconstruct instrument state. Backward seeks restart the sequencer; forward seeks render only the remaining distance. Hosts should seek on a worker thread. Reads and seeks are serialized to protect the synthesizer.
Definition at line 90 of file SynthesiserSampleProvider.cs.
|
get |
Gets the synthesizer's sample rate as stereo IEEE float audio.
Definition at line 39 of file SynthesiserSampleProvider.cs.