File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
examples/examples-webserver/streams-generator-webserverex_wav Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ void setup() {
28
28
AudioLogger::instance ().begin (Serial,AudioLogger::Info);
29
29
HttpLogger.setLevel (tinyhttp::Info);
30
30
31
+ // activate additional checks
32
+ copier.setCheckAvailableForWrite (true );
33
+
31
34
// start server
32
35
auto cfg = server.defaultConfig ();
33
36
cfg.sample_rate = sample_rate;
Original file line number Diff line number Diff line change @@ -156,6 +156,9 @@ class AudioWAVServerEx : public AudioServerEx {
156
156
}
157
157
158
158
protected:
159
+ // Dynamic memory
160
+ tinyhttp::StrExt header;
161
+
159
162
// wav files start with a 44 bytes header
160
163
virtual tinyhttp::Str* getReplyHeader () {
161
164
header.allocate (44 );
@@ -174,10 +177,6 @@ class AudioWAVServerEx : public AudioServerEx {
174
177
175
178
return &header;
176
179
}
177
-
178
- // Dynamic memory
179
- tinyhttp::StrExt header;
180
-
181
180
};
182
181
183
182
}
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ class StreamCopyT {
258
258
int (*availableCallback)(Stream*stream)=nullptr ;
259
259
void *onWriteObj = nullptr ;
260
260
bool is_first = false ;
261
- bool check_available_for_write = true ;
261
+ bool check_available_for_write = false ;
262
262
const char * actual_mime = nullptr ;
263
263
int retryLimit = COPY_RETRY_LIMIT;
264
264
int delay_on_no_data = COPY_DELAY_ON_NODATA;
You can’t perform that action at this time.
0 commit comments