IAudioService
Namespace: MonineEngine.Core
The interface for the AudioService.
public interface IAudioService : IService, System.IDisposable
Implements IService, IDisposable
Methods
PlayClip(String, Single, Single, Single, Boolean)
Loads an AudioClip from the path and plays it, with the given parameters.
void PlayClip(string path, float volume, float pitch, float pan, bool loop)
Parameters
path String
The location of the audio file in assets.
volume Single
The volume to play the clip at. Defaults to 1 and ranges from 0 to 1.
pitch Single
The pitch to play the clip at. Defaults to 0 and ranges from -1 to 1.
pan Single
The direction the clip should come from. Defaults to 0 and ranges from -1 (left) to 1 (right).
loop Boolean
Whether the audio will loop at the end of playback.
Initialize(ContentManager)
Initializes the service.
void Initialize(ContentManager content)
Parameters
content ContentManager
The ContentManager of the game.
StopAll()
Stops every currently playing sound.
void StopAll()