Skip to content

Commit

Permalink
update simulator third party libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
westlicht committed Nov 13, 2023
1 parent dac9d12 commit 082bec8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/platform/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set(platform_linker_flags "" PARENT_SCOPE)

set(platform_sources
# soloud
${CMAKE_CURRENT_SOURCE_DIR}/libs/soloud/src/audiosource/wav/dr_impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/soloud/src/audiosource/wav/soloud_wav.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/soloud/src/audiosource/wav/stb_vorbis.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/soloud/src/backend/sdl2_static/soloud_sdl2_static.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/platform/sim/libs/args
2 changes: 1 addition & 1 deletion src/platform/sim/libs/nanovg
2 changes: 1 addition & 1 deletion src/platform/sim/libs/pybind11
Submodule pybind11 updated 262 files
2 changes: 1 addition & 1 deletion src/platform/sim/libs/soloud
Submodule soloud updated 432 files
2 changes: 1 addition & 1 deletion src/platform/sim/libs/tinyformat
5 changes: 3 additions & 2 deletions src/platform/sim/sim/frontend/instruments/Synth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,15 @@ SynthInstance::SynthInstance(Synth &synth) :
SynthInstance::~SynthInstance() {
}

void SynthInstance::getAudio(float *aBuffer, unsigned int aSamples) {
for (size_t i = 0; i < aSamples; ++i) {
unsigned int SynthInstance::getAudio(float *aBuffer, unsigned int aSamplesToRead, unsigned int aBufferSize) {
for (size_t i = 0; i < aSamplesToRead; ++i) {
if (i % 128 == 0) {
_voice->setGate(_synth._gate);
_voice->setCv(_synth._cv);
}
aBuffer[i] = _voice->process();
}
return aSamplesToRead;
}

bool SynthInstance::hasEnded() {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/sim/sim/frontend/instruments/Synth.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SynthInstance : public SoLoud::AudioSourceInstance {
SynthInstance(Synth &synth);
virtual ~SynthInstance();

virtual void getAudio(float *aBuffer, unsigned int aSamples) override;
virtual unsigned int getAudio(float *aBuffer, unsigned int aSamplesToRead, unsigned int aBufferSize) override;
virtual bool hasEnded() override;

private:
Expand Down

0 comments on commit 082bec8

Please sign in to comment.