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 44namespace audio_tools {
55
66/* **
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
88 * it's corresponding scaled int values.
99 */
1010
@@ -13,15 +13,19 @@ class FloatAudio {
1313 FloatAudio () = default ;
1414 FloatAudio (float in) { this ->value = in; }
1515
16+ inline operator float () { return value; }
17+
1618 explicit inline operator int8_t () { return value * 127 ; }
1719
1820 explicit inline operator int16_t () { return value * 32767 ; }
1921
20- inline operator float () { return value; }
22+ explicit inline operator int24_3bytes_t () {
23+ return value * 8388607 ;
24+ }
2125
22- // explicit inline operator int24_t () {
23- // return value * 8388607;
24- // }
26+ explicit inline operator int24_4bytes_t () {
27+ return value * 8388607 ;
28+ }
2529
2630 explicit inline operator int32_t () { return value * 2147483647 ; }
2731
You can’t perform that action at this time.
0 commit comments