public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id = id;

            _freq1 = 0x02D0;
            _step1 = -0x000A;
            _freq2 = 0x0122;
            _step2 = 0x000A;
            _freq3 = 0x02BC;
            _step3 = -0x0005;
            _freq4 = 0x010E;
            _step4 = 0x0007;

            var tmp_data1 = new byte[_size1];
            var tmp_data2 = new byte[_size2];
            var tmp_data3 = new byte[_size1];
            var tmp_data4 = new byte[_size2];
            Array.Copy(data, _offset1, tmp_data1, 0, _size1);
            Array.Copy(data, _offset2, tmp_data2, 0, _size2);
            Array.Copy(data, _offset1, tmp_data3, 0, _size1);
            Array.Copy(data, _offset2, tmp_data4, 0, _size2);
            Player.StartChannel(Id | 0x000, tmp_data1, _size1, BASE_FREQUENCY / _freq1, _vol, 0, _size1, -127);
            Player.StartChannel(Id | 0x100, tmp_data2, _size2, BASE_FREQUENCY / _freq2, _vol, 0, _size2, 127);
            Player.StartChannel(Id | 0x200, tmp_data3, _size1, BASE_FREQUENCY / _freq3, _vol, 0, _size1, 127);
            Player.StartChannel(Id | 0x300, tmp_data4, _size2, BASE_FREQUENCY / _freq4, _vol, 0, _size2, -127);
        }
Example #2
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;

            _freq1 = 0x02D0;
            _step1 = -0x000A;
            _freq2 = 0x0122;
            _step2 = 0x000A;
            _freq3 = 0x02BC;
            _step3 = -0x0005;
            _freq4 = 0x010E;
            _step4 = 0x0007;

            var tmp_data1 = new byte[_size1];
            var tmp_data2 = new byte[_size2];
            var tmp_data3 = new byte[_size1];
            var tmp_data4 = new byte[_size2];

            Array.Copy(data, _offset1, tmp_data1, 0, _size1);
            Array.Copy(data, _offset2, tmp_data2, 0, _size2);
            Array.Copy(data, _offset1, tmp_data3, 0, _size1);
            Array.Copy(data, _offset2, tmp_data4, 0, _size2);
            Player.StartChannel(Id | 0x000, tmp_data1, _size1, BASE_FREQUENCY / _freq1, _vol, 0, _size1, -127);
            Player.StartChannel(Id | 0x100, tmp_data2, _size2, BASE_FREQUENCY / _freq2, _vol, 0, _size2, 127);
            Player.StartChannel(Id | 0x200, tmp_data3, _size1, BASE_FREQUENCY / _freq3, _vol, 0, _size1, 127);
            Player.StartChannel(Id | 0x300, tmp_data4, _size2, BASE_FREQUENCY / _freq4, _vol, 0, _size2, -127);
        }
Example #3
0
 public override void Start(IPlayerMod mod, int id, byte[] data)
 {
     Player = mod;
     Id = id;
     var tmp_data1 = new byte[_size];
     var tmp_data2 = new byte[_size];
     Array.Copy(data, _offset, tmp_data1, 0, _size);
     Array.Copy(data, _offset, tmp_data2, 0, _size);
     int vol1 = (_vol1 << 1) | (_vol1 >> 5);
     int vol2 = (_vol2 << 1) | (_vol2 >> 5);
     Player.StartChannel(Id | 0x000, tmp_data1, _size, BASE_FREQUENCY / _freq1, vol1, 0, _size, -127);
     Player.StartChannel(Id | 0x100, tmp_data2, _size, BASE_FREQUENCY / _freq2, vol2, 0, _size, 127);
 }
Example #4
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;
            var tmp_data1 = new byte[_size];
            var tmp_data2 = new byte[_size];

            Array.Copy(data, _offset, tmp_data1, 0, _size);
            Array.Copy(data, _offset, tmp_data2, 0, _size);
            int vol1 = (_vol1 << 1) | (_vol1 >> 5);
            int vol2 = (_vol2 << 1) | (_vol2 >> 5);

            Player.StartChannel(Id | 0x000, tmp_data1, _size, BASE_FREQUENCY / _freq1, vol1, 0, _size, -127);
            Player.StartChannel(Id | 0x100, tmp_data2, _size, BASE_FREQUENCY / _freq2, vol2, 0, _size, 127);
        }
Example #5
0
 public override void Start(IPlayerMod mod, int id, byte[] data)
 {
     Player = mod;
     Id = id;
     var tmp_data = new byte[_size];
     Array.Copy(data, _offset, tmp_data, 0, _size);
     int vol = (_vol << 2) | (_vol >> 4);
     Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _freq, vol, _loopoffset, _loopoffset + _loopsize);
 }
 public override void Start(IPlayerMod mod, int id, byte[] data)
 {
     Player = mod;
     Id = id;
     var tmp_data = new byte[_size];
     Array.Copy(data, _offset, tmp_data, 0, _size);
     _curfreq = _freq1;
     _curvol = 0x3F;
     Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _curfreq, (_curvol << 2) | (_curvol >> 4), 0, _size);
 }
 public override void Start(IPlayerMod mod, int id, byte[] data)
 {
     Player = mod;
     Id = id;
     var tmp_data = new byte[_size];
     Array.Copy(data, _offset, tmp_data, 0, _size);
     _curvol = 1;
     _dir = 0;
     Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _freq, _curvol, 0, _size);
 }
 public override void Start(IPlayerMod mod, int id, byte[] data)
 {
     Player = mod;
     Id = id;
     var tmp_data = new byte[_size];
     Array.Copy(data, _offset, tmp_data, 0, _size);
     _curvol = (ushort)((_vol << 3) | (_vol >> 3));
     _curfreq = _freq;
     Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _curfreq, _curvol >> 1, 0, _size);
 }
Example #9
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;
            var tmp_data = new byte[_size];

            Array.Copy(data, _offset, tmp_data, 0, _size);
            _curvol = 1;
            _dir    = 0;
            Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _freq, _curvol, 0, _size);
        }
Example #10
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;
            var tmp_data = new byte[_size];

            Array.Copy(data, _offset, tmp_data, 0, _size);
            _curfreq = _freq1;
            _curvol  = 0x3F;
            Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _curfreq, (_curvol << 2) | (_curvol >> 4), 0, _size);
        }
Example #11
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;
            var tmp_data = new byte[_size];

            Array.Copy(data, _offset, tmp_data, 0, _size);
            _curvol  = (ushort)((_vol << 3) | (_vol >> 3));
            _curfreq = _freq;
            Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _curfreq, _curvol >> 1, 0, _size);
        }
Example #12
0
 public override void Start(IPlayerMod mod, int id, byte[] data)
 {
     Player = mod;
     Id = id;
     var size = Math.Min(_size, data.Length - _offset);
     var tmp_data = new byte[size];
     Array.Copy(data, _offset, tmp_data, 0, size);
     int vol = (_vol << 2) | (_vol >> 4);
     Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _freq, vol);
     _ticks = 1 + (60 * _size * _freq) / BASE_FREQUENCY;
 }
Example #13
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;
            var tmp_data = new byte[_size];

            Array.Copy(data, _offset, tmp_data, 0, _size);
            int vol = (_vol << 2) | (_vol >> 4);

            Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _freq, vol, _loopoffset, _loopoffset + _loopsize);
        }
Example #14
0
        public override void Start(IPlayerMod mod, int id, byte[] data)
        {
            Player = mod;
            Id     = id;
            var size     = Math.Min(_size, data.Length - _offset);
            var tmp_data = new byte[size];

            Array.Copy(data, _offset, tmp_data, 0, size);
            int vol = (_vol << 2) | (_vol >> 4);

            Player.StartChannel(Id, tmp_data, _size, BASE_FREQUENCY / _freq, vol);
            _ticks = 1 + (60 * _size * _freq) / BASE_FREQUENCY;
        }