ISoundManager
Declaration
public interface Strawberry.Sound.ISoundManager
Manages all sounds in the game
Implements: Strawberry.IBase
Properties
IsEnabled abstract
bool IsEnabled { get set }
ActiveListener abstract
Current active sound listener. NOTE: There can only be 1 active listener.
Sound3DListener ActiveListener { get set }
Methods
Update abstract
void Update()
CreateSoundBuffer abstract
Creates a sound buffer.
SoundBuffer CreateSoundBuffer(ISoundReader soundReader)
Parameters:
| Name | Type | Description |
|---|---|---|
soundReader |
Strawberry.Sound.ISoundReader |
An implementation of a sound reader, That loads correct sound format, e.g. WaveReader |
Returns: The created SoundBuffer
CreateStream abstract
Creates a sound stream.
SoundStream CreateStream(ISoundReader soundReader)
Parameters:
| Name | Type | Description |
|---|---|---|
soundReader |
Strawberry.Sound.ISoundReader |
An implementation of a sound reader, That loads correct sound format, e.g. WaveReader |
Returns: The created sound stream. You can stream sounds without loading them entirely in the memory using this class.
Create3DListener abstract
Creates a 3D sound listener.
Sound3DListener Create3DListener(Vector3 position, Vector3 velocity, Vector3 lookAt, Vector3 up, bool activate)
Parameters:
| Name | Type | Description |
|---|---|---|
position |
Strawberry.Math.Vector3 |
The position of the listener |
velocity |
Strawberry.Math.Vector3 |
The velocity of the listener |
lookAt |
Strawberry.Math.Vector3 |
The direction of the listener |
up |
Strawberry.Math.Vector3 |
The up axis of the listener |
activate |
System.Boolean |
If true, the listener will be activated immediately after creation |
Returns: A new sound listener
StopAll abstract
Stops all the sounds playing.
void StopAll()