Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow compilation in recent ARDUINO ESP32 RELEASES 2.0.1 and 2.0.2… #502

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/AudioGeneratorMIDI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@

#include "AudioGeneratorMIDI.h"

#if __GNUC__ == 8
// Do not build, GCC8 has a compiler bug
#else // __GNUC__ == 8

#pragma GCC optimize ("O3")

#define TSF_NO_STDIO
Expand Down Expand Up @@ -637,3 +641,5 @@ void AudioGeneratorMIDI::MakeStreamFromAFS(AudioFileSource *src, tsf_stream *afs
afs->size = &afs_size;
}

#endif //__GNUC__ == 8

5 changes: 5 additions & 0 deletions src/AudioGeneratorMIDI.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#ifndef _AUDIOGENERATORMIDI_H
#define _AUDIOGENERATORMIDI_H

#if __GNUC__ == 8
// Do not build, GCC8 has a compiler bug
#else // __GNUC__ == 8

#include "AudioGenerator.h"

#define TSF_NO_STDIO
Expand Down Expand Up @@ -176,6 +180,7 @@ class AudioGeneratorMIDI : public AudioGenerator
short samplesRendered[256];
};

#endif //__GNUC__ == 8

#endif