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); }
public Player_V3A(ScummEngine scumm, IPlayerMod mod) { _vm = scumm; for (var i = 0; i < V3A_MAXMUS; i++) { _mus[i].id = 0; _mus[i].dur = 0; } for (var i = 0; i < V3A_MAXSFX; i++) { _sfx[i].id = 0; _sfx[i].dur = 0; } _curSong = 0; _songData = null; _songPtr = 0; _songDelay = 0; _music_timer = 0; _isinit = false; _mod = mod; _mod.SetUpdateProc(playMusic, 60); }
public Player_V2A(ScummEngine scumm, IPlayerMod modPlayer) { _vm = scumm; _mod = modPlayer; _mod.SetUpdateProc(UpdateSound, 60); }
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; _data = new byte[BitConverter.ToUInt16(data, 0)]; Array.Copy(data, _data, _data.Length); Soundon(); _loop = 0; _loopctr = 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); }
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; _data = new byte[BitConverter.ToUInt16(data, 0)]; Array.Copy(data, _data, _data.Length); Soundon(); _curdur = 0; _ticks = _durations[_curdur++]; }
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); }
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; }
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); }
public override void Start(IPlayerMod mod, int id, byte[] data) { Player = mod; Id = id; _data = new byte[BitConverter.ToUInt16(data, 0)]; Array.Copy(data, _data, _data.Length); _loopnum = 1; _step = 2; _curfreq = _freq1; Soundon(_data, _offset1, _size1); }
public void Start(IPlayerMod mod, int id, byte[] data) { Player = mod; Id = id; _data = new byte[BitConverter.ToUInt16(data, 0)]; Array.Copy(data, _data, _data.Length); _chan[0].dataptr_i = _chan1off; _chan[1].dataptr_i = _chan2off; _chan[2].dataptr_i = _chan3off; _chan[3].dataptr_i = _chan4off; for (int i = 0; i < 4; i++) { _chan[i].dataptr = _chan[i].dataptr_i; _chan[i].volbase = 0; _chan[i].volptr = 0; _chan[i].chan = 0; _chan[i].dur = 0; _chan[i].ticks = 0; } Update(); }
public override void Start(IPlayerMod mod, int id, byte[] data) { base.Start(mod, id, data); _ticks = 0; }
public abstract void Start(IPlayerMod mod, int id, byte[] data);