Beispiel #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.handle != 0)
     {
         Bgm.ReleaseNative(this.handle);
         this.handle = 0;
     }
 }
Beispiel #2
0
        public Bgm(byte[] fileImage)
        {
            int errorCode = Bgm.NewFromFileImage(fileImage, out this.handle);

            if (errorCode < 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Beispiel #3
0
        public Bgm(string filename)
        {
            int errorCode = Bgm.NewFromFilename(filename, out this.handle);

            if (errorCode < 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Beispiel #4
0
        public BgmPlayer CreatePlayer()
        {
            int bgmPlayerId;
            int errorCode = Bgm.CreatePlayerNative(this.handle, out bgmPlayerId);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            return(new BgmPlayer(bgmPlayerId));
        }