Finishing all voices

Starting echos
(random sound generator)
This commit is contained in:
Melefo
2021-02-05 16:39:14 +01:00
parent 96fe1a5e33
commit bdd0f2375d
5 changed files with 83 additions and 15 deletions
+3 -4
View File
@@ -8,11 +8,10 @@
namespace ComSquare::APU::DSP
{
DSP::DSP(int16_t *buffer, int32_t size, std::weak_ptr<MemoryMap> map) : _map(map)
DSP::DSP(int16_t *buffer, uint32_t size, std::weak_ptr<MemoryMap> map) : _map(map)
{
this->_state.buffer = buffer;
this->_state.bufferStart = buffer;
this->_state.bufferEnd = buffer + size;
this->_state.bufferSize = size;
}
uint8_t DSP::read(uint24_t addr) const
@@ -796,6 +795,6 @@ namespace ComSquare::APU::DSP
int32_t DSP::getSamplesCount() const
{
return this->_state.buffer - this->_state.bufferStart;
return this->_state.bufferOffset;
}
}