prepare for possible major optimization
by just forwarding an output buffer to the dispatch and begin/length, the number of calls may be reduced which improves performance.
This commit is contained in:
parent
055b4f9c26
commit
6efcfc2e8a
19 changed files with 178 additions and 132 deletions
|
|
@ -2,11 +2,15 @@
|
|||
#include "../engine.h"
|
||||
#include <math.h>
|
||||
|
||||
void DivPlatformSMS::acquire(int& l, int& r) {
|
||||
void DivPlatformSMS::acquire(short** buf, size_t start, size_t len) {
|
||||
sn->sound_stream_update(buf[0]+start,len);
|
||||
memcpy(buf[1]+start,buf[0]+start,sizeof(short)*len);
|
||||
}
|
||||
|
||||
int DivPlatformSMS::acquireOne() {
|
||||
short v;
|
||||
sn->sound_stream_update(&v,1);
|
||||
l=v;
|
||||
r=v;
|
||||
return v;
|
||||
}
|
||||
|
||||
void DivPlatformSMS::tick() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue