VOGONS


First post, by clearcase

User metadata
Rank Newbie
Rank
Newbie

Hello.
Complete outsider here. Just looking through munt mt32emu source code and in Synth.cpp noticed in Synth::loadPCMROM it has:

int order[16] = {0, 9, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 8};

with the loop:

for (int u = 0; u < 15; u++) {
...
}

so it's only accessing index 0-14 rather than 0-15. No idea if this is intensional so just ignore this if so.

Reply 1 of 4, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Good catch! We might be losing the least significant bit of all the PCM samples.

Reply 2 of 4, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Confirmed

Reply 3 of 4, by zirkoni

User metadata
Rank Member
Rank
Member

Why is the limit hard coded "15"? Why not set it dynamically?
Or another option, using C++11 range based loop:

for(int& o : order) ...

https://youtube.com/@zirkoni42

Reply 4 of 4, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

zirkoni
I honestly have no answers to these questions...