소스 검색

Move combine effect constants to class enum, not global scope

dds
PaulStoffregen 6 년 전
부모
커밋
f3a3ca864c
1개의 변경된 파일13개의 추가작업 그리고 12개의 파일을 삭제
  1. +13
    -12
      effect_combine.h

+ 13
- 12
effect_combine.h 파일 보기

@@ -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…
취소
저장