We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b36fb34 commit ba2f996Copy full SHA for ba2f996
src/AudioTools/CoreAudio/StreamCopy.h
@@ -55,12 +55,14 @@ class StreamCopyT {
55
56
/// Ends the processing
57
void end() {
58
+ if (is_cleanup_from) delete this->from;
59
this->from = nullptr;
60
this->to = nullptr;
61
}
62
63
/// assign a new output and input stream
64
void begin(Print &to, Stream &from){
65
+ is_cleanup_from = true;
66
this->from = new AudioStreamWrapper(from);
67
this->to = &to;
68
begin();
@@ -357,6 +359,7 @@ class StreamCopyT {
357
359
int (*availableCallback)(Stream*stream)=nullptr;
358
360
void *onWriteObj = nullptr;
361
bool is_first = false;
362
+ bool is_cleanup_from = false;
363
bool check_available_for_write = false;
364
bool check_available = true;
365
const char* actual_mime = nullptr;
0 commit comments