/// <summary> /// Reads an asset from file. /// </summary> /// <param name="assetName">The name of the asset.</param> /// <returns>The loaded asset.</returns> /// <exception cref="ObjectDisposedException"><c>ObjectDisposedException</c>.</exception> /// <exception cref="ArgumentNullException">Argument is null.</exception> protected SoundBuffer ReadAssetSoundBuffer(string assetName) { if (IsDisposed) { throw new ObjectDisposedException(ToString()); } if (string.IsNullOrEmpty(assetName)) { throw new ArgumentNullException("assetName"); } var ret = new MyLazySoundBuffer(GetAssetPath(assetName)); return(ret); }
/// <summary> /// Reads an asset from file. /// </summary> /// <param name="assetName">The name of the asset.</param> /// <returns>The loaded asset.</returns> /// <exception cref="ObjectDisposedException"><c>ObjectDisposedException</c>.</exception> /// <exception cref="ArgumentNullException">Argument is null.</exception> protected SoundBuffer ReadAssetSoundBuffer(string assetName) { if (IsDisposed) throw new ObjectDisposedException(ToString()); if (string.IsNullOrEmpty(assetName)) throw new ArgumentNullException("assetName"); var ret = new MyLazySoundBuffer(GetAssetPath(assetName)); return ret; }