Skip to content

Commit

Permalink
fix mp3 plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gemu2015 committed Aug 19, 2024
1 parent fc533cb commit 1fc3bc2
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 35 deletions.
10 changes: 5 additions & 5 deletions lib/libesp32/berry/generate/be_const_bytes.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/* extern binary arrays */
extern const binstance_arg3 be_const_instance_;
extern const binstance_arg3 be_const_instance_00030005000A000F00110012FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000100020003FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00030005000A000F00110012FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00000001FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000010002000300040005FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000010002000300040005FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000010002FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000020003000F0011FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000050007000A000B000D000E0017FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00070008000F400B400CFFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00000001000200080009FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000100020003000400050006000700080009000A000F001100120013FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000200030004FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00030004FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000100020008FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00000001000200030004FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000100020003000400050006000700080009000A000F001100120013FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000010007FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000200030004FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_00000001000200030004FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_000000050007000A000B000C000D000E000F0017FFF8FFF9FFFAFFFBFFFCFFFD;
extern const binstance_arg3 be_const_instance_0000000100070008000F4001400AFFF8FFF9FFFAFFFBFFFCFFFD;
10 changes: 5 additions & 5 deletions lib/libesp32/berry/generate/be_const_bytes_def.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/* binary arrays */
be_define_const_bytes_empty();
be_define_const_bytes(00030005000A000F00110012FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x03, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x0F, 0x00, 0x11, 0x00, 0x12, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000100020003FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00030005000A000F00110012FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x03, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x0F, 0x00, 0x11, 0x00, 0x12, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00000001FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000010002000300040005FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000010002000300040005FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000010002FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000020003000F0011FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x0F, 0x00, 0x11, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000050007000A000B000D000E0017FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x0A, 0x00, 0x0B, 0x00, 0x0D, 0x00, 0x0E, 0x00, 0x17, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00070008000F400B400CFFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x07, 0x00, 0x08, 0x00, 0x0F, 0x40, 0x0B, 0x40, 0x0C, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00000001000200080009FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x09, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000100020003000400050006000700080009000A000F001100120013FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0A, 0x00, 0x0F, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000200030004FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00030004FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x03, 0x00, 0x04, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000100020008FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00000001000200030004FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000100020003000400050006000700080009000A000F001100120013FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0A, 0x00, 0x0F, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(FFF8FFF9FFFAFFFBFFFCFFFD, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000010007FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000200030004FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(00000001000200030004FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(000000050007000A000B000C000D000E000F0017FFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x0A, 0x00, 0x0B, 0x00, 0x0C, 0x00, 0x0D, 0x00, 0x0E, 0x00, 0x0F, 0x00, 0x17, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
be_define_const_bytes(0000000100070008000F4001400AFFF8FFF9FFFAFFFBFFFCFFFD, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x0F, 0x40, 0x01, 0x40, 0x0A, 0xFF, 0xF8, 0xFF, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFF, 0xFC, 0xFF, 0xFD);
34 changes: 33 additions & 1 deletion tasmota/Plugins/mp3-decoder/mp3_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#undef log_d
#define log_d


#if 0
static const uint8_t m_HUFF_PAIRTABS =32;
static const uint8_t m_BLOCK_SIZE =18;
static const uint8_t m_NBANDS =32;
Expand All @@ -17,6 +19,18 @@ static const uint16_t m_MAINBUF_SIZE =1940;
static const uint8_t m_MAX_NGRAN =2; // max granules
static const uint8_t m_MAX_NCHAN =2; // max channels
static const uint16_t m_MAX_NSAMP =576; // max samples per channel, per granule
#else
#define m_HUFF_PAIRTABS 32
#define m_BLOCK_SIZE 18
#define m_NBANDS 32
#define m_MAX_REORDER_SAMPS (192-126)*3
#define m_VBUF_LENGTH 17*2* m_NBANDS
#define m_MAX_SCFBD 4
#define m_MAINBUF_SIZE 1940
#define m_MAX_NGRAN 2
#define m_MAX_NCHAN 2
#define m_MAX_NSAMP 576
#endif

enum {
ERR_MP3_NONE = 0,
Expand Down Expand Up @@ -285,6 +299,7 @@ const int pow2frac[8] PROGMEM = {
0x50a28be6, 0x7fffffff, 0x6597fa94, 0x50a28be6
};

#if 0
const uint16_t m_HUFF_OFFSET_01= 0;
const uint16_t m_HUFF_OFFSET_02= 9 + m_HUFF_OFFSET_01;
const uint16_t m_HUFF_OFFSET_03= 65 + m_HUFF_OFFSET_02;
Expand All @@ -300,6 +315,23 @@ const uint16_t m_HUFF_OFFSET_13=185 + m_HUFF_OFFSET_12;
const uint16_t m_HUFF_OFFSET_15=497 + m_HUFF_OFFSET_13;
const uint16_t m_HUFF_OFFSET_16=580 + m_HUFF_OFFSET_15;
const uint16_t m_HUFF_OFFSET_24=651 + m_HUFF_OFFSET_16;
#else
#define m_HUFF_OFFSET_01 0
#define m_HUFF_OFFSET_02 9+m_HUFF_OFFSET_01
#define m_HUFF_OFFSET_03 65+m_HUFF_OFFSET_02
#define m_HUFF_OFFSET_05 65+m_HUFF_OFFSET_03
#define m_HUFF_OFFSET_06 257+m_HUFF_OFFSET_05
#define m_HUFF_OFFSET_07 129+m_HUFF_OFFSET_06
#define m_HUFF_OFFSET_08 110+m_HUFF_OFFSET_07
#define m_HUFF_OFFSET_09 280+m_HUFF_OFFSET_08
#define m_HUFF_OFFSET_10 93+m_HUFF_OFFSET_09
#define m_HUFF_OFFSET_11 320+m_HUFF_OFFSET_10
#define m_HUFF_OFFSET_12 296+m_HUFF_OFFSET_11
#define m_HUFF_OFFSET_13 185+m_HUFF_OFFSET_12
#define m_HUFF_OFFSET_15 497+m_HUFF_OFFSET_13
#define m_HUFF_OFFSET_16 580+m_HUFF_OFFSET_15
#define m_HUFF_OFFSET_24 651+m_HUFF_OFFSET_16
#endif

const int huffTabOffset[m_HUFF_PAIRTABS] PROGMEM = {
0, m_HUFF_OFFSET_01, m_HUFF_OFFSET_02, m_HUFF_OFFSET_03,
Expand Down Expand Up @@ -370,7 +402,7 @@ const int/*short*/samplesPerFrameTab[3][3] PROGMEM = { { 384, 1152, 1152 }, /* M
};

/* layers 1, 2, 3 */
const short bitsPerSlotTab[3] = { 32, 8, 8 };
//const short bitsPerSlotTab[3] = PROGMEM { 32, 8, 8 };

/* indexing = [version][mono/stereo]
* number of bytes in side info section of bitstream
Expand Down
13 changes: 9 additions & 4 deletions tasmota/Plugins/mp3-decoder/mp3_decoder_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

#include "../pgmspace_32.h"

#define pgm_read_byte_inlined pgm_read_byte_inlined_32
#define pgm_read_word_inlined pgm_read_word_inlined_32
#define pgm_read_float_unaligned pgm_read_float_unaligned_32
#define pgm_read_dword_unaligned pgm_read_dword_unaligned_32

#define NO_RELOC

/* clip to range [-2^n, 2^n - 1] */
Expand Down Expand Up @@ -1552,7 +1557,7 @@ int MP3Decode( unsigned char *inbuf, int *bytesLeft, short *outbuf, int useSize)
int offset, bitOffset, mainBits, gr, ch, fhBytes, siBytes, freeFrameBytes;
int prevBitOffset, sfBlockBits, huffBlockBits;
unsigned char *mainPtr;
static uint8_t underflowCounter = 0; // http://macslons-irish-pub-radio.stream.laut.fm/macslons-irish-pub-radio
uint8_t underflowCounter = 0; // http://macslons-irish-pub-radio.stream.laut.fm/macslons-irish-pub-radio

/* unpack frame header */
fhBytes = UnpackFrameHeader(inbuf);
Expand Down Expand Up @@ -2837,7 +2842,7 @@ void IntensityProcMPEG1(int x[m_MAX_NCHAN][m_MAX_NSAMP], int nSamps, ScaleFacto
sampsLeft = nSamps - i; /* process to length of left */
// isfTab = (int *) ISFMpeg1[midSideFlag];
const int *isp = ISFMpeg1[midSideFlag];
isp += EXEC_OFFSET;
isp += EXEC_OFFSET >> 2;

isfTab = (int *)isp;

Expand Down Expand Up @@ -2960,7 +2965,7 @@ void IntensityProcMPEG2(int x[m_MAX_NCHAN][m_MAX_NSAMP], int nSamps,
(void) mixFlag;

isfTab = (int *) ISFMpeg2[sfjs->intensityScale][midSideFlag];
isfTab += EXEC_OFFSET;
isfTab += EXEC_OFFSET >> 2;
mOutL = mOutR = 0;

/* fill buffer with illegal intensity positions (depending on slen) */
Expand Down Expand Up @@ -4030,7 +4035,7 @@ void FDCT32(int *buf, int *dest, int offset, int oddBlock, int gb) {
SETREGS
int i, s, tmp, es;
const int *cptr = (const int*)m_dcttab;
cptr += EXEC_OFFSET;
cptr += EXEC_OFFSET >> 2;
int a0, a1, a2, a3, a4, a5, a6, a7;
int b0, b1, b2, b3, b4, b5, b6, b7;
int *d;
Expand Down
35 changes: 18 additions & 17 deletions tasmota/Plugins/pgmspace_32.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* PGMSPACE.H - Accessor utilities/types for accessing PROGMEM data */

#ifndef _PGMSPACE_H_
#define _PGMSPACE_H_
#ifndef _PGMSPACE_H_32_
#define _PGMSPACE_H_32_

#ifdef ESP32
//#ifdef ESP8266

#include <stdint.h>
/*
Expand Down Expand Up @@ -174,31 +175,31 @@ extern "C" {
:"1"(addr) \
:"a15");

static inline uint8_t pgm_read_byte_inlined(const void* addr) {
MODULE_PART uint8_t pgm_read_byte_inlined_32(const void* addr) {
uint32_t res;
pgm_read_with_offset(addr, res);
return (uint8_t) res; /* This masks the lower byte from the returned word */
}

/* Although this says "word", it's actually 16 bit, i.e. half word on Xtensa */
static inline uint16_t pgm_read_word_inlined(const void* addr) {
MODULE_PART uint16_t pgm_read_word_inlined_32(const void* addr) {
uint32_t res;
pgm_read_with_offset(addr, res);
return (uint16_t) res; /* This masks the lower half-word from the returned word */
}

/* Can't legally cast bits of uint32_t to a float w/o conversion or std::memcpy, which is inefficient. */
/* The ASM block doesn't care the type, so just pass in what C thinks is a float and return in custom fcn. */
static inline float pgm_read_float_unaligned(const void *addr) {
MODULE_PART float pgm_read_float_unaligned_32(const void *addr) {
float res;
pgm_read_with_offset(addr, res);
return res;
}
#undef pgm_read_byte
#undef pgm_read_word_aligned

#define pgm_read_byte(addr) pgm_read_byte_inlined(addr)
#define pgm_read_word_aligned(addr) pgm_read_word_inlined(addr)
#define pgm_read_byte(addr) pgm_read_byte_inlined_32(addr)
#define pgm_read_word_aligned(addr) pgm_read_word_inlined_32(addr)

#undef pgm_read_dword_aligned
#undef pgm_read_float_aligned
Expand All @@ -214,14 +215,14 @@ static inline float pgm_read_float_unaligned(const void *addr) {
#define pgm_read_ptr_aligned(addr) (*(const void* const*)(addr))
#endif

static inline uint32_t pgm_read_dword_unaligned(const void *addr) {
MODULE_PART uint32_t pgm_read_dword_unaligned_32(const void *addr) {
uint32_t res;
pgm_read_dword_with_offset(addr, res);
return res;
}

#define pgm_read_ptr_unaligned(addr) ((void*)pgm_read_dword_unaligned(addr))
#define pgm_read_word_unaligned(addr) ((uint16_t)(pgm_read_dword_unaligned(addr) & 0xffff))
#define pgm_read_ptr_unaligned(addr) ((void*)pgm_read_dword_unaligned_32(addr))
#define pgm_read_word_unaligned(addr) ((uint16_t)(pgm_read_dword_unaligned_32(addr) & 0xffff))


// Allow selection of _aligned or _unaligned, but default to _unaligned for Arduino compatibility
Expand All @@ -237,14 +238,14 @@ static inline uint32_t pgm_read_dword_unaligned(const void *addr) {

#if PGM_READ_UNALIGNED
#define pgm_read_word(a) pgm_read_word_unaligned(a)
#define pgm_read_dword(a) pgm_read_dword_unaligned(a)
#define pgm_read_float(a) pgm_read_float_unaligned(a)
#define pgm_read_ptr(a) pgm_read_ptr_unaligned(a)
#define pgm_read_dword(a) pgm_read_dword_unaligned_32(a)
#define pgm_read_float(a) pgm_read_float_unaligned_32(a)
#define pgm_read_ptr(a) pgm_read_ptr_unaligned_32(a)
#else
#define pgm_read_word(a) pgm_read_word_aligned(a)
#define pgm_read_dword(a) pgm_read_dword_aligned(a)
#define pgm_read_float(a) pgm_read_float_aligned(a)
#define pgm_read_ptr(a) pgm_read_ptr_aligned(a)
#define pgm_read_word(a) pgm_read_word_aligned_32(a)
#define pgm_read_dword(a) pgm_read_dword_aligned_32(a)
#define pgm_read_float(a) pgm_read_float_aligned_32(a)
#define pgm_read_ptr(a) pgm_read_ptr_aligned_32(a)
#endif


Expand Down
6 changes: 3 additions & 3 deletions tasmota/Plugins/xdrv_42_i2s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct {
uint32_t Format; // "WAV"
} wav_riff_t;

// FMT header
// FMT header
typedef struct {
uint32_t Subchunk1ID; //"fmt "
uint32_t Subchunk1Size; //16 (PCM)
Expand Down Expand Up @@ -119,9 +119,9 @@ typedef struct {
// esp8266 fixed i2s pins : DOUT = 3(RX), BCK = 15(D8), WS = 2(D4)

#ifdef USE_MP3
#define MODNAME "I2SAUDIOM"
#else
#define MODNAME "I2SAUDIO"
#else
#define MODNAME "I2SWAV"
#endif

#define I2S_REV 1 << 16 | 4
Expand Down

0 comments on commit 1fc3bc2

Please sign in to comment.