Skip to content

Commit

Permalink
Work around isnanf and isinff missing from host compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-xmos committed Sep 25, 2023
1 parent 5a98bc7 commit 0655ced
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib_xcore_math/src/mel_spectrogram/mel_spectrogram.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#include "xmath/mel_spectrogram/coeffs/hann_512.h"
#include "xmath/mel_spectrogram/coeffs/hann_1024.h"

#ifndef __XS3A__
#define isnanf isnan
#define isinff isinf
#endif

typedef enum
{
MEL_SPEC_PAD_MODE_CONSTANT,
Expand Down Expand Up @@ -436,7 +441,9 @@ static inline void _get_slice_centre(int16_t *const dst,
// Naively calculated by looking at the three arrays I'm creating in this func
// then rounding up for luck.
// Worth keeping an eye on.
#ifdef __XS3A__
#pragma stackfunction 1024
#endif
static void x_mel_spec(int8_t *const output,
int8_t *const out_trim_top,
int8_t *const out_trim_end,
Expand Down

0 comments on commit 0655ced

Please sign in to comment.