Show / Hide Table of Contents

Interface ISampleProvider

Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public interface ISampleProvider

Properties

Name

The unique name of this sample provider type.

Declaration
string Name { get; }
Property Value
Type Description
System.String

Methods

GetSamples(SoundEffect)

Generates samples based on the given sound effect object.

Declaration
float[] GetSamples(SoundEffect soundEffect)
Parameters
Type Name Description
SoundEffect soundEffect

The sound effect.

Returns
Type Description
System.Single[]

The samples.

GetSamples(Single, Single, Single, Int32)

Returns samples generated by the sample provider, based on the given pitch, duration, volume and tone index.

Declaration
float[] GetSamples(float pitch, float volume, float duration, int toneIndex = 0)
Parameters
Type Name Description
System.Single pitch

The pitch in Hertz.

System.Single volume

The volume. Where 0 is 0% and 1 is 100%.

System.Single duration

The length in seconds if the samples are played.

System.Int32 toneIndex

The index of the tone in a sequence of tones.

Returns
Type Description
System.Single[]

The samples.

Back to top Generated by DocFX