File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
examples/tests/conversion/numberformat-converter-typed
src/AudioTools/CoreAudio/AudioBasic Expand file tree Collapse file tree 2 files changed +9
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 4
4
namespace audio_tools {
5
5
6
6
/* **
7
- * A simple float number (in the range of -1.0 to 1.0) the supports the conversion to
7
+ * A simple float number (in the range of -1.0 to 1.0) that supports the conversion to
8
8
* it's corresponding scaled int values.
9
9
*/
10
10
@@ -13,15 +13,19 @@ class FloatAudio {
13
13
FloatAudio () = default ;
14
14
FloatAudio (float in) { this ->value = in; }
15
15
16
+ inline operator float () { return value; }
17
+
16
18
explicit inline operator int8_t () { return value * 127 ; }
17
19
18
20
explicit inline operator int16_t () { return value * 32767 ; }
19
21
20
- inline operator float () { return value; }
22
+ explicit inline operator int24_3bytes_t () {
23
+ return value * 8388607 ;
24
+ }
21
25
22
- // explicit inline operator int24_t () {
23
- // return value * 8388607;
24
- // }
26
+ explicit inline operator int24_4bytes_t () {
27
+ return value * 8388607 ;
28
+ }
25
29
26
30
explicit inline operator int32_t () { return value * 2147483647 ; }
27
31
You can’t perform that action at this time.
0 commit comments