Update to remove warnings, fix new 8266 core rev
Remove build warnings and use the faster pgm_read_*_aligned macros to update to the latest ESP8266 Arduino core.
This commit is contained in:
1 parent
2f2898c496
commit
2d8a97767c
10 files changed
+12
-4
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
name=ESP8266Audio
|
name=ESP8266Audio
|
||||||
version=1.1.3
|
version=1.1.4
|
||||||
author=Earle F. Philhower, III
|
author=Earle F. Philhower, III
|
||||||
maintainer=Earle F. Philhower, III
|
maintainer=Earle F. Philhower, III
|
||||||
sentence=Audio file and I2S sound playing routines.
|
sentence=Audio file and I2S sound playing routines.
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ void AudioFileSourceBuffer::fill()
|
|||||||
int cnt = src->readNonBlock(&buffer[writePtr], bytesAvailEnd);
|
int cnt = src->readNonBlock(&buffer[writePtr], bytesAvailEnd);
|
||||||
length += cnt;
|
length += cnt;
|
||||||
writePtr = (writePtr + cnt) % buffSize;
|
writePtr = (writePtr + cnt) % buffSize;
|
||||||
if (cnt != bytesAvailEnd) return;
|
if (cnt != (int)bytesAvailEnd) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readPtr > 1) {
|
if (readPtr > 1) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ AudioFileSourceHTTPStream::AudioFileSourceHTTPStream(const char *url)
|
|||||||
bool AudioFileSourceHTTPStream::open(const char *url)
|
bool AudioFileSourceHTTPStream::open(const char *url)
|
||||||
{
|
{
|
||||||
pos = 0;
|
pos = 0;
|
||||||
http.begin(url);
|
http.begin(client, url);
|
||||||
http.setReuse(true);
|
http.setReuse(true);
|
||||||
int code = http.GET();
|
int code = http.GET();
|
||||||
if (code != HTTP_CODE_OK) {
|
if (code != HTTP_CODE_OK) {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class AudioFileSourceHTTPStream : public AudioFileSource
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
virtual uint32_t readInternal(void *data, uint32_t len, bool nonBlock);
|
virtual uint32_t readInternal(void *data, uint32_t len, bool nonBlock);
|
||||||
|
WiFiClient client;
|
||||||
HTTPClient http;
|
HTTPClient http;
|
||||||
int pos;
|
int pos;
|
||||||
int size;
|
int size;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ bool AudioFileSourceICYStream::open(const char *url)
|
|||||||
{
|
{
|
||||||
static const char *hdr[] = { "icy-metaint" };
|
static const char *hdr[] = { "icy-metaint" };
|
||||||
pos = 0;
|
pos = 0;
|
||||||
http.begin(url);
|
http.begin(client, url);
|
||||||
http.addHeader("Icy-MetaData", "1");
|
http.addHeader("Icy-MetaData", "1");
|
||||||
http.collectHeaders( hdr, 1 );
|
http.collectHeaders( hdr, 1 );
|
||||||
http.setReuse(true);
|
http.setReuse(true);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#define PGM_READ_UNALIGNED 0
|
||||||
|
|
||||||
#include "AudioGeneratorMOD.h"
|
#include "AudioGeneratorMOD.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#define PGM_READ_UNALIGNED 0
|
||||||
|
|
||||||
/* config.h. Generated from config.h.in by configure. */
|
/* config.h. Generated from config.h.in by configure. */
|
||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
//#ifdef HAVE_CONFIG_H
|
//#ifdef HAVE_CONFIG_H
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
//#endif
|
//#endif
|
||||||
|
#define PGM_READ_UNALIGNED 0
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <pgmspace.h>
|
#include <pgmspace.h>
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#ifndef FLAC__PRIVATE__CRC_H
|
#ifndef FLAC__PRIVATE__CRC_H
|
||||||
#define FLAC__PRIVATE__CRC_H
|
#define FLAC__PRIVATE__CRC_H
|
||||||
|
|
||||||
|
#define PGM_READ_UNALIGNED 0
|
||||||
|
|
||||||
#include <pgmspace.h>
|
#include <pgmspace.h>
|
||||||
|
|
||||||
#include "../FLAC/ordinals.h"
|
#include "../FLAC/ordinals.h"
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
#include "coder.h"
|
#include "coder.h"
|
||||||
|
#define PGM_READ_UNALIGNED 0 // Only support aligned reads, faster
|
||||||
#include <pgmspace.h>
|
#include <pgmspace.h>
|
||||||
|
|
||||||
/* helper macros - see comments in hufftabs.c about the format of the huffman tables */
|
/* helper macros - see comments in hufftabs.c about the format of the huffman tables */
|
||||||
|
|||||||
Reference in new issue
Block a user