Fix 16bit sample reading from gus memory
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4004
This commit is contained in:
parent
271d8cffa6
commit
c4ed80ca35
1 changed files with 3 additions and 2 deletions
|
@ -179,9 +179,10 @@ public:
|
|||
}
|
||||
|
||||
INLINE Bit32s GetSample16() const {
|
||||
Bit32u useAddr = WaveAddr >> WAVE_FRACT;
|
||||
// Formula used to convert addresses for use with 16-bit samples
|
||||
Bit32u holdAddr = WaveAddr & 0xc0000L;
|
||||
Bit32u useAddr = WaveAddr & 0x1ffffL;
|
||||
Bit32u holdAddr = useAddr & 0xc0000L;
|
||||
useAddr = useAddr & 0x1ffffL;
|
||||
useAddr = useAddr << 1;
|
||||
useAddr = (holdAddr | useAddr);
|
||||
if (WaveAdd >= (1 << WAVE_FRACT)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue