Skip to content

Commit

Permalink
Fixing crash on MP3 playback on ESP8266. (#723)
Browse files Browse the repository at this point in the history
Co-authored-by: kurt.haenen <[email protected]>
  • Loading branch information
Misterke and kurt.haenen authored Dec 25, 2024
1 parent cdd07c9 commit b0a06ed
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/libmad/layer3.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ static mad_fixed_t const root_table_val[7] PROGMEM = {
};
static inline mad_fixed_t root_table(int i)
{
return root_table_val[i];
volatile mad_fixed_t a = root_table_val[i];
return a;
}
/*
coefficients for aliasing reduction
Expand All @@ -381,7 +382,8 @@ static mad_fixed_t const cs_val[8] PROGMEM = {
};
static inline mad_fixed_t cs(int i)
{
return cs_val[i];
volatile mad_fixed_t a = cs_val[i];
return a;
}

static mad_fixed_t const ca_val[8] PROGMEM = {
Expand All @@ -392,7 +394,8 @@ static mad_fixed_t const ca_val[8] PROGMEM = {
};
static inline mad_fixed_t ca(int i)
{
return ca_val[i];
volatile mad_fixed_t a = ca_val[i];
return a;
}

/*
Expand Down Expand Up @@ -438,7 +441,8 @@ static mad_fixed_t const window_l_val[36] PROGMEM = {
};
static inline mad_fixed_t window_l(int i)
{
return window_l_val[i];
volatile mad_fixed_t a = window_l_val[i];
return *(mad_fixed_t*)&a;
}
# endif /* ASO_IMDCT */

Expand All @@ -458,7 +462,8 @@ static mad_fixed_t const window_s_val[12] PROGMEM = {
};
static inline mad_fixed_t window_s(int i)
{
return window_s_val[i];
volatile mad_fixed_t a = window_s_val[i];
return a;
}

/*
Expand All @@ -479,7 +484,8 @@ static mad_fixed_t const is_table_val[7] PROGMEM = {
};
static inline mad_fixed_t is_table(int i)
{
return is_table_val[i];
volatile mad_fixed_t a = is_table_val[i];
return a;
}

/*
Expand Down

0 comments on commit b0a06ed

Please sign in to comment.