C# Class kOS.Sound.SoundMaker

Inheritance: UnityEngine.MonoBehaviour, ISoundMaker
Mostra file Open project: KSP-KOS/KOS Class Usage Examples

Public Methods

Method Description
AddGenericVoices ( int howMany ) : void
AttachTo ( SharedObjects sharedObj ) : void
BeginFileSound ( string name, float volume = 1f ) : bool
GetVoice ( int num ) : IVoice
GetWaveName ( int voiceNum ) : string
LoadFileSound ( string name, string url ) : void

Load a fixed sound effect from a file.

LoadProceduralSound ( string name, ProceduralSoundWave waveGen ) : void

Load a sound wave sample that was built procedurally in memory. These kinds of samples can be stretched later to play at different notes.

SetWave ( int num, string waveName ) : bool
StopAllVoices ( ) : void

Private Methods

Method Description
Awake ( ) : void
Destroy ( ) : void

Method Details

AddGenericVoices() public method

public AddGenericVoices ( int howMany ) : void
howMany int
return void

AttachTo() public method

public AttachTo ( SharedObjects sharedObj ) : void
sharedObj SharedObjects
return void

BeginFileSound() public method

public BeginFileSound ( string name, float volume = 1f ) : bool
name string
volume float
return bool

GetVoice() public method

public GetVoice ( int num ) : IVoice
num int
return IVoice

GetWaveName() public method

public GetWaveName ( int voiceNum ) : string
voiceNum int
return string

LoadFileSound() public method

Load a fixed sound effect from a file.
public LoadFileSound ( string name, string url ) : void
name string
url string
return void

LoadProceduralSound() public method

Load a sound wave sample that was built procedurally in memory. These kinds of samples can be stretched later to play at different notes.
public LoadProceduralSound ( string name, ProceduralSoundWave waveGen ) : void
name string
waveGen ProceduralSoundWave
return void

SetWave() public method

public SetWave ( int num, string waveName ) : bool
num int
waveName string
return bool

StopAllVoices() public method

public StopAllVoices ( ) : void
return void