Skip to content

Commit

Permalink
Get working patch for init
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Oct 17, 2024
1 parent 0360064 commit a778c78
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/cortex
9 changes: 5 additions & 4 deletions patches/init/oscillator/oscillator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "daisy_patch_sm.h"
#include "cortex.h"
#include "daisy_patch_sm.h"

using namespace daisy;
using namespace patch_sm;
Expand All @@ -25,15 +25,16 @@ void AudioCallback(AudioHandle::InterleavingInputBuffer in,
oscillator.SetFrequency(freq);

for (size_t idx = 0; idx < size; idx += 2) {
auto sample = (float) oscillator.Generate();
auto sample = (float)oscillator.Generate();
out[idx] = sample;
out[idx + 1] = sample;
}
}

int main(void) {
int main(void)
{
hardware.Init();
hardware.StartAudio(AudioCallback);

while(1) {}
while (1) { }
}
2 changes: 1 addition & 1 deletion patches/seed/oscillator/oscillator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void AudioCallback(AudioHandle::InterleavingInputBuffer in,
size_t size)
{
for (size_t idx = 0; idx < size; idx += 2) {
auto sample = (float) oscillator.Generate();
auto sample = (float)oscillator.Generate();
out[idx] = sample;
out[idx + 1] = sample;
}
Expand Down
1 change: 1 addition & 0 deletions scripts/flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

printf "Flashing patch \"$PATCH\""
make clean -s
make -s
make -s program-dfu
Expand Down

0 comments on commit a778c78

Please sign in to comment.