diff options
author | Chris Robinson <[email protected]> | 2023-03-05 11:39:20 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-03-05 11:39:20 -0800 |
commit | 28ec3afb7949be155aaa477c6e8c7358ac309459 (patch) | |
tree | d50af7a052df4cf0acd7d540f7fd8b06770dc5ff /examples | |
parent | 442cfdd14ea01f8c9d494d544213b40dc696841f (diff) |
Fix compiling examples with an older libsndfile
Which lack the SF_FORMAT_MPEG_LAYER_* enums.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/alplay.c | 9 | ||||
-rw-r--r-- | examples/alstream.c | 9 | ||||
-rw-r--r-- | examples/alstreamcb.cpp | 9 |
3 files changed, 18 insertions, 9 deletions
diff --git a/examples/alplay.c b/examples/alplay.c index 6f6c8699..4291cb47 100644 --- a/examples/alplay.c +++ b/examples/alplay.c @@ -87,9 +87,12 @@ static ALuint LoadSound(const char *filename) case SF_FORMAT_DOUBLE: case SF_FORMAT_VORBIS: case SF_FORMAT_OPUS: - case SF_FORMAT_MPEG_LAYER_I: - case SF_FORMAT_MPEG_LAYER_II: - case SF_FORMAT_MPEG_LAYER_III: + case SF_FORMAT_ALAC_20: + case SF_FORMAT_ALAC_24: + case SF_FORMAT_ALAC_32: + case 0x0080/*SF_FORMAT_MPEG_LAYER_I*/: + case 0x0081/*SF_FORMAT_MPEG_LAYER_II*/: + case 0x0082/*SF_FORMAT_MPEG_LAYER_III*/: if(alIsExtensionPresent("AL_EXT_FLOAT32")) sample_format = Float; break; diff --git a/examples/alstream.c b/examples/alstream.c index e89481b1..a61680d2 100644 --- a/examples/alstream.c +++ b/examples/alstream.c @@ -148,9 +148,12 @@ static int OpenPlayerFile(StreamPlayer *player, const char *filename) case SF_FORMAT_DOUBLE: case SF_FORMAT_VORBIS: case SF_FORMAT_OPUS: - case SF_FORMAT_MPEG_LAYER_I: - case SF_FORMAT_MPEG_LAYER_II: - case SF_FORMAT_MPEG_LAYER_III: + case SF_FORMAT_ALAC_20: + case SF_FORMAT_ALAC_24: + case SF_FORMAT_ALAC_32: + case 0x0080/*SF_FORMAT_MPEG_LAYER_I*/: + case 0x0081/*SF_FORMAT_MPEG_LAYER_II*/: + case 0x0082/*SF_FORMAT_MPEG_LAYER_III*/: if(alIsExtensionPresent("AL_EXT_FLOAT32")) player->sample_type = Float; break; diff --git a/examples/alstreamcb.cpp b/examples/alstreamcb.cpp index c7ebcbe3..a2e7b659 100644 --- a/examples/alstreamcb.cpp +++ b/examples/alstreamcb.cpp @@ -134,9 +134,12 @@ struct StreamPlayer { case SF_FORMAT_DOUBLE: case SF_FORMAT_VORBIS: case SF_FORMAT_OPUS: - case SF_FORMAT_MPEG_LAYER_I: - case SF_FORMAT_MPEG_LAYER_II: - case SF_FORMAT_MPEG_LAYER_III: + case SF_FORMAT_ALAC_20: + case SF_FORMAT_ALAC_24: + case SF_FORMAT_ALAC_32: + case 0x0080/*SF_FORMAT_MPEG_LAYER_I*/: + case 0x0081/*SF_FORMAT_MPEG_LAYER_II*/: + case 0x0082/*SF_FORMAT_MPEG_LAYER_III*/: if(alIsExtensionPresent("AL_EXT_FLOAT32")) mSampleFormat = SampleType::Float; break; |