Sfoglia il codice sorgente

Move combine effect constants to class enum, not global scope

dds
PaulStoffregen 6 anni fa
parent
commit
f3a3ca864c
1 ha cambiato i file con 13 aggiunte e 12 eliminazioni
  1. +13
    -12
      effect_combine.h

+ 13
- 12
effect_combine.h Vedi File

@@ -1,5 +1,5 @@
/* Audio Library for Teensy 3.X
* Copyright (c) 2014, Paul Stoffregen, paul@pjrc.com
/* Copyright (c) 2018 John-Michael Reed
* bleeplabs.com
*
* Development of this audio library was funded by PJRC.COM, LLC by sales of
* Teensy and Audio Adaptor boards. Please support PJRC's efforts to develop
@@ -22,10 +22,10 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
Combine analog signals with bitwise expressions like OXR. Combining two simple oscillators results in interesting new waveforms,
Combining white noise or dynamic incoming audio results in aggressive digital distortion.
*
* Combine analog signals with bitwise expressions like XOR.
* Combining two simple oscillators results in interesting new waveforms,
* Combining white noise or dynamic incoming audio results in aggressive digital distortion.
*/

#ifndef effect_digital_combine_h_
@@ -33,16 +33,17 @@
#include <Arduino.h>
#include "AudioStream.h"

#define OR 0
#define XOR 1
#define AND 2
#define MODULO 3

class AudioEffectDigitalCombine : public AudioStream
{
public:
enum combineMode {
OR = 0,
XOR = 1,
AND = 2,
MODULO = 3,
};
AudioEffectDigitalCombine() : AudioStream(2, inputQueueArray), mode_sel(OR) { }
void mode(short mode_in) {
void setCombineMode(int mode_in) {
if (mode_in > 3) {
mode_in = 3;
}

Loading…
Annulla
Salva