Read a float from PROGMEM. On AVR this reads flash via pgm_read_dword; on other platforms it's a plain memory read via memcpy (no aliasing issues).
| 23 | /// Read a float from PROGMEM. On AVR this reads flash via pgm_read_dword; |
| 24 | /// on other platforms it's a plain memory read via memcpy (no aliasing issues). |
| 25 | inline float fl_progmem_read_float(const float* addr) { |
| 26 | u32 raw = FL_PGM_READ_DWORD_ALIGNED(addr); |
| 27 | float result; |
| 28 | FL_BUILTIN_MEMCPY(&result, &raw, sizeof(float)); |
| 29 | return result; |
| 30 | } |
| 31 | |
| 32 | // ============================================================================ |
| 33 | // 1/6-octave frequency points: 61 points from 20 Hz to 20 kHz |
no outgoing calls
no test coverage detected