mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 08:23:01 +00:00
SAA1099: try fixing big endian
This commit is contained in:
parent
f6f6101762
commit
22938d240d
1 changed files with 7 additions and 0 deletions
|
@ -71,10 +71,17 @@ void DivPlatformSAA1099::acquire_saaSound(short* bufL, short* bufR, size_t start
|
||||||
writes.pop();
|
writes.pop();
|
||||||
}
|
}
|
||||||
saa_saaSound->GenerateMany((unsigned char*)saaBuf[0],len,oscBuf);
|
saa_saaSound->GenerateMany((unsigned char*)saaBuf[0],len,oscBuf);
|
||||||
|
#ifdef TA_BIG_ENDIAN
|
||||||
|
for (size_t i=0; i<len; i++) {
|
||||||
|
bufL[i+start]=(short)((((unsigned short)saaBuf[0][1+(i<<1)])<<8)|(((unsigned short)saaBuf[0][1+(i<<1)])>>8));
|
||||||
|
bufR[i+start]=(short)((((unsigned short)saaBuf[0][i<<1])<<8)|(((unsigned short)saaBuf[0][i<<1])>>8));
|
||||||
|
}
|
||||||
|
#else
|
||||||
for (size_t i=0; i<len; i++) {
|
for (size_t i=0; i<len; i++) {
|
||||||
bufL[i+start]=saaBuf[0][i<<1];
|
bufL[i+start]=saaBuf[0][i<<1];
|
||||||
bufR[i+start]=saaBuf[0][1+(i<<1)];
|
bufR[i+start]=saaBuf[0][1+(i<<1)];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformSAA1099::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
void DivPlatformSAA1099::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||||
|
|
Loading…
Reference in a new issue