Exemplo n.º 1
0
        public void Dispose()
        {
            Console.WriteLine("Shutdown music.");

            if (stream != null)
            {
                stream.Stop();
                stream.Dispose();
                stream = null;
            }
        }
Exemplo n.º 2
0
        public SfmlMusic(Config config, string sfPath)
        {
            try
            {
                Console.Write("Initialize music: ");

                this.config = config;

                this.stream  = new MusStream(this, config, sfPath);
                this.current = Bgm.NONE;

                Console.WriteLine("OK");
            }
            catch (Exception e)
            {
                Console.WriteLine("Failed");
                this.Dispose();
                ExceptionDispatchInfo.Throw(e);
            }
        }