public override BufferData Lock(int offset, int length)
        {
            BufferData data = new BufferData();
            uint len1, len2;
            IntPtr addr1, addr2;

            offset = offset.Align(_blockAlign);
            length = length.Align(_blockAlign);

            data._dataOffset = offset;
            data._dataLength = length;
            data._sampleOffset = offset / _blockAlign;
            data._sampleLength = length / _blockAlign;

            if (length != 0)
            {
                _dsb8.Lock((uint)offset, (uint)length, out addr1, out len1, out addr2, out len2, 0);

                data._part1Address = addr1;
                data._part1Length = (int)len1;
                data._part1Samples = (int)len1 / _blockAlign;

                data._part2Address = addr2;
                data._part2Length = (int)len2;
                data._part2Samples = (int)len2 / _blockAlign;
            }

            return data;
        }
 public abstract void Unlock(BufferData data);
Пример #3
0
 public override void Unlock(BufferData data)
 {
     _dsb8.Unlock(data._part1Address, (uint)data._part1Length, data._part2Address, (uint)data._part2Length);
 }
 public override void Unlock(BufferData data)
 {
     _dsb8.Unlock(data._part1Address, (uint)data._part1Length, data._part2Address, (uint)data._part2Length);
 }
Пример #5
0
 public abstract void Unlock(BufferData data);