Update to v106r30 release.

byuu says:

Changelog:

  - nall/GNUmakefile: fixed findstring parameter arguments [Screwtape]
  - nall/Windows: always include -mthreads -lpthread for all
    applications
  - nall/memory: code restructuring

I really wanted to work on the new PPU today, but I thought I'd spend a
few minutes making some minor improvements to nall::memory, that was
five and a half hours ago. Now I have a 67KiB diff of changes. Sigh.
This commit is contained in:
Tim Allen
2018-05-28 11:16:27 +10:00
parent 6882bd98cf
commit 685cec6583
73 changed files with 372 additions and 389 deletions

View File

@@ -91,7 +91,7 @@ struct AudioALSA : Audio {
_offset--;
output++;
}
memory::move(_buffer, output, _offset * sizeof(uint32_t));
memory::move<uint32_t>(_buffer, output, _offset);
}
}

View File

@@ -71,10 +71,10 @@ struct AudioASIO : Audio {
auto clear() -> void {
if(!ready()) return;
for(uint n : range(_channels)) {
memory::fill(_channel[n].buffers[0], _latency * _sampleSize);
memory::fill(_channel[n].buffers[1], _latency * _sampleSize);
memory::fill<uint8_t>(_channel[n].buffers[0], _latency * _sampleSize);
memory::fill<uint8_t>(_channel[n].buffers[1], _latency * _sampleSize);
}
memory::fill(_queue.samples, sizeof(_queue.samples));
memory::fill<uint8_t>(_queue.samples, sizeof(_queue.samples));
_queue.read = 0;
_queue.write = 0;
_queue.count = 0;

View File

@@ -51,7 +51,7 @@ struct AudioDirectSound : Audio {
_ringWrite = _rings - 1;
_ringDistance = _rings - 1;
if(_buffer) memory::fill(_buffer, _period * _rings * 4);
if(_buffer) memory::fill<uint32_t>(_buffer, _period * _rings);
_offset = 0;
if(!_secondary) return;
@@ -61,7 +61,7 @@ struct AudioDirectSound : Audio {
void* output;
DWORD size;
_secondary->Lock(0, _period * _rings * 4, &output, &size, 0, 0, 0);
memory::fill(output, size);
memory::fill<uint8_t>(output, size);
_secondary->Unlock(output, size, 0, 0);
_secondary->Play(0, 0, DSBPLAY_LOOPING);
@@ -102,7 +102,7 @@ struct AudioDirectSound : Audio {
void* output;
DWORD size;
if(_secondary->Lock(_ringWrite * _period * 4, _period * 4, &output, &size, 0, 0, 0) == DS_OK) {
memory::copy(output, _buffer, _period * 4);
memory::copy<uint32_t>(output, _buffer, _period);
_secondary->Unlock(output, size, 0, 0);
}
}

View File

@@ -53,7 +53,7 @@ struct AudioXAudio2 : Audio, public IXAudio2VoiceCallback {
_bufferIndex = 0;
_bufferOffset = 0;
if(_buffer) memory::fill(_buffer, _period * _bufferCount * sizeof(uint32_t));
if(_buffer) memory::fill<uint32_t>(_buffer, _period * _bufferCount);
_sourceVoice->Start(0);
}