Skip to content

Commit

Permalink
Apply PR #4 without Synth_Dexed git submodule
Browse files Browse the repository at this point in the history
Credits: @dcoredump

PR #4 refers to  [Synth_Dexed](https://codeberg.org/dcoredump/Synth_Dexed) `c6e768820cffd2c9db277ebce3faf67b27efb26b` which [does not seem to exist](https://github.com/probonopd/MiniDexed/runs/5204665368?check_suite_focus=true#step:3:11). Hence applying the changes this way.
  • Loading branch information
probonopd authored Feb 15, 2022
1 parent 01ebd6c commit 0d7af29
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1,316 deletions.
Empty file removed src/Dexed.h
Empty file.
5 changes: 2 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
CIRCLE_STDLIB_DIR = ../circle-stdlib
SYNTH_DEXED_DIR = ../Synth_Dexed/src

OBJS = main.o kernel.o miniorgan.o \
$(SYNTH_DEXED_DIR)/synth_dexed.o \
OBJS = main.o kernel.o $(SYNTH_DEXED_DIR)/synth_dexed.o

INCLUDE += -I $(SYNTH_DEXED_DIR) -I tuning-library
INCLUDE += -I $(SYNTH_DEXED_DIR)

EXTRACLEAN = $(SYNTH_DEXED_DIR)/*.o $(SYNTH_DEXED_DIR)/*.d

Expand Down
14 changes: 5 additions & 9 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
//
#include "kernel.h"
#include <iostream>
#include <synth_dexed.h>

CKernel::CKernel (void)
: CStdlibAppStdio ("minidexed"),
m_I2CMaster (CMachineInfo::Get ()->GetDevice (DeviceI2CMaster), TRUE),
m_MiniOrgan (&mInterrupt, &m_I2CMaster)
m_Dexed(16,SAMPLE_RATE,&mInterrupt, &m_I2CMaster)
{
mActLED.Blink (5); // show we are alive
}
Expand All @@ -23,10 +24,7 @@ bool CKernel::Initialize (void)
return FALSE;
}

if (!m_MiniOrgan.Initialize ())
{
return FALSE;
}
m_Dexed.activate();

return TRUE;
}
Expand All @@ -35,13 +33,11 @@ CStdlibApp::TShutdownMode CKernel::Run (void)
{
std::cout << "Hello MiniDexed!\n";

m_MiniOrgan.Start ();

while (m_MiniOrgan.IsActive ())
while(42==42)
{
boolean bUpdated = mUSBHCI.UpdatePlugAndPlay ();

m_MiniOrgan.Process (bUpdated);
m_Dexed.Process(bUpdated);
}

return ShutdownHalt;
Expand Down
4 changes: 2 additions & 2 deletions src/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <circle/types.h>
#include <circle/i2cmaster.h>
#include <circle/usb/usbhcidevice.h>
#include "miniorgan.h"
#include "synth_dexed.h"

enum TShutdownMode
{
Expand All @@ -38,7 +38,7 @@ class CKernel : public CStdlibAppStdio
private:
// do not change this order
CI2CMaster m_I2CMaster;
CMiniOrgan m_MiniOrgan;
AudioSynthDexed m_Dexed;
};

#endif
Loading

0 comments on commit 0d7af29

Please sign in to comment.