Ejemplo n.º 1
0
        public void Play(Audio.Player player)
        {
            if (!disposed && channel != 0 && BassLib.Initialized)
            {
                (player as MusicPlayer).SetCurrentChannel(channel);

                if (player.Enabled)
                {
                    BassLib.Play(channel, true);
                }
            }
        }
Ejemplo n.º 2
0
        protected Music(byte[] data, Type type)
        {
            switch (type)
            {
            case Type.Mod:
                channel = BassLib.LoadModMusic(data);
                break;

            case Type.Sfx:
                channel = BassLib.LoadSfxMusic(data);
                break;
            }

            if (channel == 0)
            {
                Log.Warn.Write(ErrorSystemType.Audio, $"Failed to load music from data: {BassLib.LastError}");
            }
        }