From 86e1aa57e03c924430c098ddccc9ae38cb9cb4c6 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Fri, 22 Nov 2019 14:50:28 +0100 Subject: [PATCH] Added pan method for monot2stereo. --- mono2stereo.cpp | 6 ++++++ mono2stereo.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mono2stereo.cpp b/mono2stereo.cpp index 41b18e9..435f7a2 100644 --- a/mono2stereo.cpp +++ b/mono2stereo.cpp @@ -29,6 +29,12 @@ // Written by Holger Wirtz // 20191122 - inital version +void Mono2Stereo::pan(float pan) +{ + constrain(pan, 0.0, 1.0); + _pan = pan; +} + void Mono2Stereo::update(void) { audio_block_t *in; diff --git a/mono2stereo.h b/mono2stereo.h index fd2ba97..68de6f0 100644 --- a/mono2stereo.h +++ b/mono2stereo.h @@ -41,7 +41,8 @@ class Mono2Stereo : public AudioStream } virtual void update(void); - + virtual void pan(float pan); + private: audio_block_t *inputQueueArray[4]; audio_block_t *out[2];