/// <summary> /// Loads a specific sound file into memory. /// </summary> /// <param name="stream"><see cref="System.IO.Stream"/> containing data.</param> /// <param name="fileName">FileName or extension => "Test.mp3" or ".mp3".</param> /// <returns>The loaded sound object.</returns> /// <exception cref="Purple.Exceptions.StreamException">Thrown if stream is invalid.</exception> /// <exception cref="SoundException">Thrown if sound format isn't supported (extension).</exception> public ISampleObject Load(System.IO.Stream stream, String fileName) { ISampleObject obj = engine.Load(stream, fileName); obj.Channel = this; return(obj); }
/// <summary> /// Loads a specific sound file into memory. /// </summary> /// <param name="fileName">Path of file.</param> /// <returns>The loaded sound object.</returns> /// <exception cref="Purple.Exceptions.StreamException">If file couldn't be loaded.</exception> /// <exception cref="SoundException">If sound format isn't supported (extension).</exception> public ISampleObject Load(string fileName) { ISampleObject obj = engine.Load(fileName); obj.Channel = this; return(obj); }