more optimization
as of now non-stereo sound chips are only processed once
This commit is contained in:
parent
6efcfc2e8a
commit
d6fb6b0bb3
17 changed files with 66 additions and 41 deletions
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
#define FREQ_BASE 8015.85f
|
||||
|
||||
void DivPlatformGB::acquire(short** buf, size_t start, size_t len) {
|
||||
void DivPlatformGB::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
for (int i=start; i<start+len; i++) {
|
||||
GB_advance_cycles(gb,16);
|
||||
buf[0][i]=gb->apu_output.final_sample.left<<2;
|
||||
buf[1][i]=gb->apu_output.final_sample.right<<2;
|
||||
bufL[i]=gb->apu_output.final_sample.left<<2;
|
||||
bufR[i]=gb->apu_output.final_sample.right<<2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -270,6 +270,10 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool DivPlatformGB::isStereo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate) {
|
||||
parent=p;
|
||||
rate=262144;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue