Skip to content

Commit 772bee1

Browse files
committed
copyAll with optional delay
1 parent b3a06f6 commit 772bee1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/AudioTools/AudioCopy.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,13 @@ class StreamCopyT {
176176
}
177177

178178
/// copies all data
179-
void copyAll(){
179+
void copyAll(int delay=5){
180180
LOGD(LOG_METHOD);
181181
if (from==nullptr || to == nullptr)
182182
return;
183183

184184
while(copy()){
185-
yield();
186-
delay(100);
185+
delay(delay);
187186
}
188187
}
189188

0 commit comments

Comments
 (0)