Merge branch 'dev' of dirkenstein/MicroDexed into dev

pull/8/head
Holger Wirtz 5 years ago committed by Gitea
commit d1577d4ef1
  1. 1
      MicroDexed.ino
  2. 1
      config.h
  3. 14
      source_microdexed.h

@ -961,7 +961,6 @@ void handleSystemReset(void)
/******************************************************************************
MIDI HELPER
******************************************************************************/
bool checkMidiChannel(byte inChannel)
{
// check for MIDI channel

@ -219,7 +219,6 @@
#endif
#if defined(__IMXRT1062__) //Teensy-4.0
#undef MIDI_DEVICE_USB_HOST
#undef MIDI_DEVICE_USB
#define MAX_NOTES 16
#endif

@ -12,10 +12,20 @@ class AudioSourceMicroDexed : public AudioStream, public Dexed {
AudioSourceMicroDexed(int sample_rate) : AudioStream(0, NULL), Dexed(sample_rate) {
};
void update(void) {
if (in_update) {
xrun++;
return;
}
else in_update = true;
elapsedMicros render_time;
audio_block_t *lblock;
lblock = allocate();
if (!lblock) return;
if (!lblock) {
in_update = false;
return;
}
getSamples(AUDIO_BLOCK_SAMPLES, lblock->data);
if (render_time > audio_block_time_us) // everything greater 2.9ms is a buffer underrun!
xrun++;
@ -24,6 +34,8 @@ class AudioSourceMicroDexed : public AudioStream, public Dexed {
transmit(lblock, 0);
release(lblock);
in_update = false;
};
private:
volatile bool in_update = false;
};

Loading…
Cancel
Save