Skip to content

Commit

Permalink
fix(macro)!: fix redefinition of macros on Windows (fixes #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
brglng committed Aug 6, 2024
1 parent 72bbb7b commit 8d285a7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/wave.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,27 @@ enum {
};

/* wave file format codes */

// Windows already has these macros in mmreg.h
#if !((defined(_WIN32) || defined(_WIN64)) && defined(WAVE_FORMAT_PCM))
#define WAVE_FORMAT_PCM ((WaveU16)0x0001)
#endif

#if !((defined(_WIN32) || defined(_WIN64)) && defined(WAVE_FORMAT_IEEE_FLOAT))
#define WAVE_FORMAT_IEEE_FLOAT ((WaveU16)0x0003)
#endif

#if !((defined(_WIN32) || defined(_WIN64)) && defined(WAVE_FORMAT_ALAW))
#define WAVE_FORMAT_ALAW ((WaveU16)0x0006)
#endif

#if !((defined(_WIN32) || defined(_WIN64)) && defined(WAVE_FORMAT_MULAW))
#define WAVE_FORMAT_MULAW ((WaveU16)0x0007)
#endif

#if !((defined(_WIN32) || defined(_WIN64)) && defined(WAVE_FORMAT_EXTENSIBLE))
#define WAVE_FORMAT_EXTENSIBLE ((WaveU16)0xfffe)
#endif

typedef enum {
WAVE_OK, /** no error */
Expand Down

0 comments on commit 8d285a7

Please # to comment.