From 330959b30d69db081b1996a731028cefaa037df0 Mon Sep 17 00:00:00 2001 From: boblark Date: Sun, 19 Mar 2023 12:04:55 -0700 Subject: [PATCH] Correction for testMode==1 - Thanks Jonathan --- examples/PlayQueueDemo/PlayQueueDemo.ino | 35 ++++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/examples/PlayQueueDemo/PlayQueueDemo.ino b/examples/PlayQueueDemo/PlayQueueDemo.ino index 8713dfe..d3d841a 100644 --- a/examples/PlayQueueDemo/PlayQueueDemo.ino +++ b/examples/PlayQueueDemo/PlayQueueDemo.ino @@ -12,6 +12,8 @@ * * Jonathan Oakley, November 2021 * Converted from I16 to F32 - Bob Larkin Feb 2023. Thanks, Jonathan + * 18 Mar 2023: Includes corrections to testMode==1, NON-STALLING from + * https://github.com/h4yn0nnym0u5e/Audio/commit/9fce95edb634891ce6d28288e87f54f4994096e8 */ #include "OpenAudio_ArduinoLibrary.h" @@ -52,8 +54,8 @@ void setup() { // Comment the following out (or set to ORIGINAL) for old stall behaviour; // set to NON_STALLING for return with status if audio blocks not available, // or no room in queue for another audio block. - queue1.setBehaviour(AudioPlayQueue_F32::NON_STALLING); - //queue1.setBehaviour(AudioPlayQueue_F32::ORIGINAL); + queue1.setBehaviour(AudioPlayQueue_F32::NON_STALLING); // <=== Set + // queue1.setBehaviour(AudioPlayQueue_F32::ORIGINAL); // or this queue1.setMaxBuffers(4); } @@ -78,10 +80,12 @@ float32_t nextSample() int loops; int nulls,nulls2; -int testMode = 2; // 1: getBuffer / playBuffer; 2: play(), mix of samples and buffers +int testMode = 2; // 1: getBuffer / playBuffer; 2: play(), mix of samples and buffers <<