This commit is contained in:
Natt Akuma 2025-02-20 05:33:31 +07:00
commit c6bb7acfad
11 changed files with 22 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View file

@ -23,6 +23,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "../pch.h" #include "../pch.h"
#include "blip_buf.h"
#include "config.h" #include "config.h"
#include "chipUtils.h" #include "chipUtils.h"
#include "defines.h" #include "defines.h"
@ -587,6 +588,14 @@ class DivDispatch {
*/ */
virtual void acquire(short** buf, size_t len); virtual void acquire(short** buf, size_t len);
/**
* fill a buffer with sound data (direct access to blip_buf).
* @param bb pointers to blip_buf instances.
* @param the offset to the first sample (use this when calling blip_add_delta).
* @param len the amount of samples to fill.
*/
virtual void acquireDirect(blip_buffer_t** bb, size_t off, size_t len);
/** /**
* fill a write stream with data (e.g. for software-mixed PCM). * fill a write stream with data (e.g. for software-mixed PCM).
* @param stream the write stream. * @param stream the write stream.
@ -777,6 +786,12 @@ class DivDispatch {
*/ */
virtual bool getWantPreNote(); virtual bool getWantPreNote();
/**
* check whether acquireDirect is available.
* @return whether it is.
*/
virtual bool hasAcquireDirect();
/** /**
* get minimum chip clock. * get minimum chip clock.
* @return clock in Hz, or 0 if custom clocks are not supported. * @return clock in Hz, or 0 if custom clocks are not supported.

View file

@ -23,6 +23,9 @@
void DivDispatch::acquire(short** buf, size_t len) { void DivDispatch::acquire(short** buf, size_t len) {
} }
void DivDispatch::acquireDirect(blip_buffer_t** bb, size_t off, size_t len) {
}
void DivDispatch::fillStream(std::vector<DivDelayedWrite>& stream, int sRate, size_t len) { void DivDispatch::fillStream(std::vector<DivDelayedWrite>& stream, int sRate, size_t len) {
} }
@ -127,6 +130,10 @@ bool DivDispatch::getDCOffRequired() {
return false; return false;
} }
bool DivDispatch::hasAcquireDirect() {
return false;
}
bool DivDispatch::getWantPreNote() { bool DivDispatch::getWantPreNote() {
return false; return false;
} }