From 9a1a09c820145c0282b63fbeaa3294bbb110648b Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Tue, 5 Nov 2024 16:46:15 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20doxygen=20from=20@=20pschatzma?= =?UTF-8?q?nn/arduino-audio-tools@ee0f04f8eb8eec9f856dea3e983f910ad7ab1f6f?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _audio_types_8h_source.html | 12 ++++++------ _codec_l8_8h_source.html | 4 ++-- _synthesizer_8h_source.html | 2 +- classaudio__tools_1_1_number_converter-members.html | 2 +- classaudio__tools_1_1_number_converter.html | 10 +++++----- functions_c.html | 2 +- functions_func_c.html | 2 +- search/all_3.js | 2 +- search/functions_3.js | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/_audio_types_8h_source.html b/_audio_types_8h_source.html index cb33199e89..7206c54e86 100644 --- a/_audio_types_8h_source.html +++ b/_audio_types_8h_source.html @@ -345,9 +345,9 @@
347 #endif
348  }
349 
-
351  template <typename From, typename T>
-
352  static T clipT(From value){
-
353  From mv = maxValue(sizeof(T)*8);
+
351  template <typename T>
+
352  static T clipT(float value){
+
353  float mv = maxValueT<T>();
354  if (value > mv){
355  return mv;
356  } else if (value < -mv){
@@ -387,7 +387,7 @@
396  template <typename FromT, typename ToT>
397  static ToT convert(FromT value){
398  int64_t value1 = value;
-
399  return clipT<FromT,ToT>(value1 * maxValueT<ToT>() / maxValueT<FromT>());
+
399  return clipT<ToT>(value1 * maxValueT<ToT>() / maxValueT<FromT>());
400  }
401 
403  template <typename FromT, typename ToT>
@@ -395,7 +395,7 @@
405  float factor = static_cast<float>(maxValueT<ToT>()) / maxValueT<FromT>();
406  float vol_factor = factor * vol;
407  for (int j=0;j<samples;j++){
-
408  to[j] = clipT<FromT, ToT>(vol_factor * from[j]);
+
408  to[j] = clipT<ToT>(vol_factor * from[j]);
409  }
410  }
411 
@@ -523,9 +523,9 @@
Converts from a source to a target number with a different type.
Definition: AudioTypes.h:298
static float toFloatT(T value)
Convert an integer integer autio type to a float (with max 1.0)
Definition: AudioTypes.h:375
static T fromFloatT(float value)
Convert a float (with max 1.0) to an integer autio type.
Definition: AudioTypes.h:381
-
static T clipT(From value)
Clips the value to avoid any over or underflows.
Definition: AudioTypes.h:352
static void convertArray(FromT *from, ToT *to, int samples, float vol=1.0f)
Convert an array of int types.
Definition: AudioTypes.h:404
static float toFloat(int32_t value, int bits)
Convert an integer integer autio type to a float (with max 1.0)
Definition: AudioTypes.h:386
+
static T clipT(float value)
Clips the value to avoid any over or underflows.
Definition: AudioTypes.h:352
static int32_t fromFloat(float value, int bits)
Convert a float (with max 1.0) to an integer autio type.
Definition: AudioTypes.h:391
static int64_t maxValue(int value_bits_per_sample)
provides the biggest number for the indicated number of bits
Definition: AudioTypes.h:325
static ToT convert(FromT value)
Convert an int number from one type to another.
Definition: AudioTypes.h:397
diff --git a/_codec_l8_8h_source.html b/_codec_l8_8h_source.html index f1b8ee7bff..fbbf4aaf5d 100644 --- a/_codec_l8_8h_source.html +++ b/_codec_l8_8h_source.html @@ -133,7 +133,7 @@
93  if (!is_signed) {
94  tmp -= 129;
95  }
-
96  return NumberConverter::clipT<int32_t, int16_t>(tmp * 258);
+
96  return NumberConverter::clipT<int16_t>(tmp * 258);
97  }
98 
99  virtual operator bool() override { return p_print!=nullptr; }
@@ -188,7 +188,7 @@
168  operator bool() override { return is_open; }
169 
170  int16_t convertSample(int16_t sample) {
-
171  int16_t tmp = NumberConverter::clipT<int16_t, int8_t>(sample / 258);
+
171  int16_t tmp = NumberConverter::clipT<int8_t>(sample / 258);
172  if (!is_signed) {
173  tmp += 129;
174  // clip to range
diff --git a/_synthesizer_8h_source.html b/_synthesizer_8h_source.html index 526fc6a88c..b03b30c3e2 100644 --- a/_synthesizer_8h_source.html +++ b/_synthesizer_8h_source.html @@ -259,7 +259,7 @@
224  // prevent divide by zero
225  int result = 0;
226  if (count>0){
-
227  result = NumberConverter::clipT<int, int16_t>(total / count);
+
227  result = NumberConverter::clipT<int16_t>(total / count);
228  }
229  return result;
230  }
diff --git a/classaudio__tools_1_1_number_converter-members.html b/classaudio__tools_1_1_number_converter-members.html index 7e4a9d4611..0cde452dac 100644 --- a/classaudio__tools_1_1_number_converter-members.html +++ b/classaudio__tools_1_1_number_converter-members.html @@ -73,7 +73,7 @@

This is the complete list of members for NumberConverter, including all inherited members.

- + diff --git a/classaudio__tools_1_1_number_converter.html b/classaudio__tools_1_1_number_converter.html index d7476ade99..721948bc4f 100644 --- a/classaudio__tools_1_1_number_converter.html +++ b/classaudio__tools_1_1_number_converter.html @@ -84,11 +84,11 @@ static int32_t  - - - - + + + + diff --git a/functions_c.html b/functions_c.html index 05765e2192..9b1c975164 100644 --- a/functions_c.html +++ b/functions_c.html @@ -154,7 +154,7 @@

- c -

clip(float value, int bits)NumberConverterinlinestatic
clipT(From value)NumberConverterinlinestatic
clipT(float value)NumberConverterinlinestatic
convert(FromT value)NumberConverterinlinestatic
convertArray(FromT *from, ToT *to, int samples, float vol=1.0f)NumberConverterinlinestatic
fromFloat(float value, int bits)NumberConverterinlinestatic
clip (float value, int bits)
 clips a value
 
-template<typename From , typename T >
static T clipT (From value)
 Clips the value to avoid any over or underflows.
 
+template<typename T >
static T clipT (float value)
 Clips the value to avoid any over or underflows.
 
template<typename FromT , typename ToT >
static ToT convert (FromT value)