Velaptor.Content.SoundLoader
Velaptor
Velaptor.Content
SoundLoader Class
Loads sound content.
public sealed class SoundLoader :
Velaptor.Content.ILoader<Velaptor.Content.ISound>
Inheritance System.Object → SoundLoader
Implements Velaptor.Content.ILoader<ISound>
Constructors
SoundLoader() Constructor
Initializes a new instance of the SoundLoader class.
public SoundLoader();
Methods
Load(string)
Loads a sound with the given name.
public Velaptor.Content.ISound Load(string contentPathOrName);
Parameters
contentPathOrName
System.String
The full file path or name of the sound to load.
Implements Load(string)
Returns
ISound
The loaded sound.
Exceptions
System.ArgumentNullException
Thrown if the contentPathOrName is null or empty.
LoadTextureException
Thrown if the resulting texture content file path is invalid.
System.IO.FileNotFoundException
Thrown if the texture file does not exist.
System.IO.IOException
The directory specified a file or the network name is not known.
System.UnauthorizedAccessException
The caller does not have the required permissions.
System.IO.PathTooLongException
The specified path, file name, or both exceed the system-defined maximum length.
System.IO.DirectoryNotFoundException
The specified path is invalid (for example, it is on an unmapped drive).
System.NotSupportedException
The path contains a colon character :
that is not part of a drive label.
Unload(string)
Unloads the data with the given contentPathOrName.
public void Unload(string contentPathOrName);
Parameters
contentPathOrName
System.String
The name of the content item to unload.
Implements Unload(string)