Skip to content

Commit

Permalink
- support older SDL_mixer API
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasVolkert committed Apr 17, 2012
1 parent 410d134 commit 543cb9f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions HomerSoundOutput/src/AudioOutSdl.cpp
Expand Up @@ -182,17 +182,20 @@ bool AudioOutSdl::OpenPlaybackDevice(int pSampleRate, bool pStereo, string pDriv
// set player callback function
Mix_ChannelFinished(PlayerCallBack);

// give info about available chunk decoders
int tNumDecoders = Mix_GetNumChunkDecoders();
LOG(LOG_INFO, "There are %d available chunk decoders..", tNumDecoders);
for(int i = 0; i < tNumDecoders; ++i)
LOG(LOG_INFO, " ..chunk decoder[%d]: %s", i, Mix_GetChunkDecoder(i));

// give info about available music decoders
tNumDecoders = Mix_GetNumMusicDecoders();
LOG(LOG_INFO, "There are %d available music decoders..", tNumDecoders);
for(int i = 0; i < tNumDecoders; ++i)
LOG(LOG_INFO, " ..music decoder[%d]: %s", i, Mix_GetMusicDecoder(i));
#if (((SDL_MIXER_MAJOR_VERSION << 16) + (SDL_MIXER_MINOR_VERSION << 8) + SDL_MIXER_PATCHLEVEL) > ((1 << 16) + (2 << 8) + 10))

// give info about available chunk decoders
int tNumDecoders = Mix_GetNumChunkDecoders();
LOG(LOG_INFO, "There are %d available chunk decoders..", tNumDecoders);
for(int i = 0; i < tNumDecoders; ++i)
LOG(LOG_INFO, " ..chunk decoder[%d]: %s", i, Mix_GetChunkDecoder(i));

// give info about available music decoders
tNumDecoders = Mix_GetNumMusicDecoders();
LOG(LOG_INFO, "There are %d available music decoders..", tNumDecoders);
for(int i = 0; i < tNumDecoders; ++i)
LOG(LOG_INFO, " ..music decoder[%d]: %s", i, Mix_GetMusicDecoder(i));
#endif

mAudioOutOpened = true;

Expand Down

0 comments on commit 543cb9f

Please sign in to comment.