protected virtual void Dispose(bool disposing) { if (this.handle != 0) { Bgm.ReleaseNative(this.handle); this.handle = 0; } }
public Bgm(byte[] fileImage) { int errorCode = Bgm.NewFromFileImage(fileImage, out this.handle); if (errorCode < 0) { Error.ThrowNativeException(errorCode); } }
public Bgm(string filename) { int errorCode = Bgm.NewFromFilename(filename, out this.handle); if (errorCode < 0) { Error.ThrowNativeException(errorCode); } }
public BgmPlayer CreatePlayer() { int bgmPlayerId; int errorCode = Bgm.CreatePlayerNative(this.handle, out bgmPlayerId); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } return(new BgmPlayer(bgmPlayerId)); }