From cfcf5447be798a4e999fb34eef4f312f1113c6c5 Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Wed, 1 Nov 2023 07:46:34 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20doxygen=20from=20@=20pschatzma?= =?UTF-8?q?nn/arduino-audio-tools@5f273724dead720de0c0b7d2e028ce7b199531d0?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _audio_i_o_8h_source.html | 2 +- _audio_server_8h_source.html | 112 ++++++++++++++------------ _i2_s_nano_sense_b_l_e_8h_source.html | 2 +- 3 files changed, 61 insertions(+), 55 deletions(-) diff --git a/_audio_i_o_8h_source.html b/_audio_i_o_8h_source.html index b0c1f07267..934c6cad86 100644 --- a/_audio_i_o_8h_source.html +++ b/_audio_i_o_8h_source.html @@ -408,7 +408,7 @@
411  info.sample_rate, sampleRate(), correctionFactor());
412  }
413 
-
414  bool isActvie() { return count_at >= 0 && counter <= count_at; }
+
414  bool isActvie() { return counter <= count_at; }
415 
416 protected:
417  const char *TAG = "SNAP";
diff --git a/_audio_server_8h_source.html b/_audio_server_8h_source.html index fd0f5236bf..f30863a71b 100644 --- a/_audio_server_8h_source.html +++ b/_audio_server_8h_source.html @@ -341,57 +341,63 @@
360 
361  virtual void sendReplyContent() {
362  TRACED();
-
363  if (callback!=nullptr){
-
364  //encoded_stream.begin(out_ptr(), encoder);
-
365  encoded_stream.setOutput(out_ptr());
-
366  encoded_stream.setEncoder(encoder);
-
367  encoded_stream.begin();
+
363  // restart encoder
+
364  if (encoder){
+
365  encoder->end();
+
366  encoder->begin();
+
367  }
368 
-
369  // provide data via Callback to encoded_stream
-
370  LOGI("sendReply - calling callback");
-
371  callback(&encoded_stream);
-
372  client_obj.stop();
-
373  } else if (in!=nullptr){
-
374  // provide data for stream: in -copy> encoded_stream -> out
-
375  LOGI("sendReply - Returning encoded stream...");
-
376  //encoded_stream.begin(out_ptr(), encoder);
-
377  encoded_stream.setOutput(out_ptr());
-
378  encoded_stream.setEncoder(encoder);
-
379  encoded_stream.begin();
-
380 
-
381  copier.begin(encoded_stream, *in);
-
382  }
-
383  }
-
384 
-
385 
-
386 };
-
387 
-
396 class AudioWAVServer : public AudioEncoderServer {
-
397  public:
-
402  AudioWAVServer(int port=80) : AudioEncoderServer(new WAVEncoder(), port){
-
403  }
-
404 
-
411  AudioWAVServer(const char* network, const char *password, int port=80) : AudioEncoderServer(new WAVEncoder(), network, password, port) {
-
412  }
-
413 
-
415  ~AudioWAVServer() {
-
416  AudioEncoder *encoder = audioEncoder();
-
417  if (encoder!=nullptr){
-
418  delete encoder;
-
419  }
-
420  }
-
421 
-
422  // provides a pointer to the encoder
-
423  WAVEncoder &wavEncoder(){
-
424  return *static_cast<WAVEncoder*>(encoder);
-
425  }
-
426 
+
369  if (callback!=nullptr){
+
370  //encoded_stream.begin(out_ptr(), encoder);
+
371  encoded_stream.setOutput(out_ptr());
+
372  encoded_stream.setEncoder(encoder);
+
373  encoded_stream.begin();
+
374 
+
375  // provide data via Callback to encoded_stream
+
376  LOGI("sendReply - calling callback");
+
377  callback(&encoded_stream);
+
378  client_obj.stop();
+
379  } else if (in!=nullptr){
+
380  // provide data for stream: in -copy> encoded_stream -> out
+
381  LOGI("sendReply - Returning encoded stream...");
+
382  //encoded_stream.begin(out_ptr(), encoder);
+
383  encoded_stream.setOutput(out_ptr());
+
384  encoded_stream.setEncoder(encoder);
+
385  encoded_stream.begin();
+
386 
+
387  copier.begin(encoded_stream, *in);
+
388  }
+
389  }
+
390 
+
391 
+
392 };
+
393 
+
402 class AudioWAVServer : public AudioEncoderServer {
+
403  public:
+
408  AudioWAVServer(int port=80) : AudioEncoderServer(new WAVEncoder(), port){
+
409  }
+
410 
+
417  AudioWAVServer(const char* network, const char *password, int port=80) : AudioEncoderServer(new WAVEncoder(), network, password, port) {
+
418  }
+
419 
+
421  ~AudioWAVServer() {
+
422  AudioEncoder *encoder = audioEncoder();
+
423  if (encoder!=nullptr){
+
424  delete encoder;
+
425  }
+
426  }
427 
-
428 };
-
429 
-
430 }
-
431 
-
432 #endif
+
428  // provides a pointer to the encoder
+
429  WAVEncoder &wavEncoder(){
+
430  return *static_cast<WAVEncoder*>(encoder);
+
431  }
+
432 
+
433 
+
434 };
+
435 
+
436 }
+
437 
+
438 #endif
Encoding of PCM data.
Definition: AudioEncoded.h:74
void setAudioInfo(AudioInfo from) override
Defines the sample rate, number of channels and bits per sample.
Definition: AudioEncoded.h:83
@@ -414,10 +420,10 @@
bool doLoop()
Add this method to your loop Returns true while the client is connected.
Definition: AudioServer.h:104
AudioServer(const char *network, const char *password, int port=80)
Construct a new Audio W A V Server object.
Definition: AudioServer.h:46
void begin(AudioServerDataCallback cb, const char *contentType)
Start the server. The data must be provided by a callback method.
Definition: AudioServer.h:77
-
A simple Arduino Webserver which streams the audio as WAV data. This class is based on the AudioEncod...
Definition: AudioServer.h:396
-
AudioWAVServer(const char *network, const char *password, int port=80)
Construct a new Audio W A V Server object.
Definition: AudioServer.h:411
-
~AudioWAVServer()
Destructor: release the allocated encoder.
Definition: AudioServer.h:415
-
AudioWAVServer(int port=80)
Construct a new Audio W A V Server object We assume that the WiFi is already connected.
Definition: AudioServer.h:402
+
A simple Arduino Webserver which streams the audio as WAV data. This class is based on the AudioEncod...
Definition: AudioServer.h:402
+
AudioWAVServer(const char *network, const char *password, int port=80)
Construct a new Audio W A V Server object.
Definition: AudioServer.h:417
+
~AudioWAVServer()
Destructor: release the allocated encoder.
Definition: AudioServer.h:421
+
AudioWAVServer(int port=80)
Construct a new Audio W A V Server object We assume that the WiFi is already connected.
Definition: AudioServer.h:408
Abstract Base class for Converters A converter is processing the data in the indicated array.
Definition: BaseConverter.h:25
bool begin() override
Starts the processing - sets the status to active.
Definition: AudioEncoded.h:328
void setOutput(Print *outputStream)
Defines the output.
Definition: AudioEncoded.h:292
diff --git a/_i2_s_nano_sense_b_l_e_8h_source.html b/_i2_s_nano_sense_b_l_e_8h_source.html index 1b72aa61b5..23db02c8bd 100644 --- a/_i2_s_nano_sense_b_l_e_8h_source.html +++ b/_i2_s_nano_sense_b_l_e_8h_source.html @@ -465,7 +465,7 @@
429  }
430 
431  // on stream option we only need to have the arrays allocated
-
432  if (p_nano_ble_stream!=null){
+
432  if (p_nano_ble_stream!=nullptr){
433  return p_i2s_array_1!=nullptr && p_i2s_array_2!=nullptr;
434  }
435  return p_i2s_array_1!=nullptr && p_i2s_array_2!=nullptr && p_i2s_buffer!=nullptr;