minimp3: Add a .cpp file to simplify building the single-header implementation

Single-header libraries like this require passing a bunch of defines _once_
before including the header, but not multiple times. This can make it tricky
in user code to know when to request the implementation, if the header needs
to be included in multiple files.

So properly compiling a .cpp file for the implementation solves this, and
also enables us to properly disable warnings on thirdparty implementation code.
This commit is contained in:
Rémi Verschelde 2023-06-15 13:41:52 +02:00
parent 7734146060
commit 6fc0912137
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 27 additions and 12 deletions

View file

@ -28,11 +28,6 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#define MINIMP3_ONLY_MP3
#define MINIMP3_FLOAT_OUTPUT
#define MINIMP3_IMPLEMENTATION
#define MINIMP3_NO_STDIO
#include "audio_stream_mp3.h"
#include "core/io/file_access.h"