Gondwana Game Engine Development (master) - 2.6.1
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.
Loading...
Searching...
No Matches
Gondwana.Audio.Midi.WaveProviderToWaveStream Class Reference

Wraps an IWaveProvider as a WaveStream with support for length and seeking. More...

Inheritance diagram for Gondwana.Audio.Midi.WaveProviderToWaveStream:

Public Member Functions

 WaveProviderToWaveStream (IWaveProvider source, double durationSeconds, Action< TimeSpan >? seekHandler)
 Initializes a new instance of the WaveProviderToWaveStream class.
override int Read (byte[] buffer, int offset, int count)
 Reads audio data from the underlying wave provider.

Properties

override WaveFormat WaveFormat [get]
 Gets the wave format of the stream.
override long Length [get]
 Gets the length of the stream in bytes.
override long Position [get, set]
 Gets or sets the current position in the stream in bytes.

Detailed Description

Wraps an IWaveProvider as a WaveStream with support for length and seeking.

Definition at line 8 of file WaveProviderToWaveStream.cs.

Constructor & Destructor Documentation

◆ WaveProviderToWaveStream()

Gondwana.Audio.Midi.WaveProviderToWaveStream.WaveProviderToWaveStream ( IWaveProvider source,
double durationSeconds,
Action< TimeSpan >? seekHandler )

Initializes a new instance of the WaveProviderToWaveStream class.

Parameters
sourceThe underlying wave provider to wrap.
durationSecondsThe duration of the audio stream in seconds.
seekHandlerOptional callback handler for seeking operations. If null, seeking will not be supported.

Definition at line 24 of file WaveProviderToWaveStream.cs.

Member Function Documentation

◆ Read()

override int Gondwana.Audio.Midi.WaveProviderToWaveStream.Read ( byte[] buffer,
int offset,
int count )

Reads audio data from the underlying wave provider.

Parameters
bufferThe buffer to read data into.
offsetThe offset in the buffer to start writing data.
countThe maximum number of bytes to read.
Returns
The number of bytes actually read.

Definition at line 73 of file WaveProviderToWaveStream.cs.

Property Documentation

◆ Length

override long Gondwana.Audio.Midi.WaveProviderToWaveStream.Length
get

Gets the length of the stream in bytes.

Definition at line 40 of file WaveProviderToWaveStream.cs.

◆ Position

override long Gondwana.Audio.Midi.WaveProviderToWaveStream.Position
getset

Gets or sets the current position in the stream in bytes.

Exceptions
NotSupportedExceptionThrown when attempting to set the position without a seek handler.

Definition at line 46 of file WaveProviderToWaveStream.cs.

◆ WaveFormat

override WaveFormat Gondwana.Audio.Midi.WaveProviderToWaveStream.WaveFormat
get

Gets the wave format of the stream.

Definition at line 35 of file WaveProviderToWaveStream.cs.