You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 lines
845 B

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. #if defined HAVE_CONFIG_H
  11. # include "config.h"
  12. #endif
  13. #if defined USE_SDL_MIXER
  14. # if defined HAVE_SDL_SDL_H
  15. # include <SDL/SDL.h>
  16. # else
  17. # include <SDL.h>
  18. # endif
  19. # if defined HAVE_SDL_SDL_MIXER_H
  20. # include <SDL/SDL_mixer.h>
  21. # else
  22. # include <SDL_mixer.h>
  23. # endif
  24. #endif
  25. #include "core.h"
  26. namespace lol
  27. {
  28. /*
  29. * Public Audio class
  30. */
  31. void Audio::Setup(int channels)
  32. {
  33. #if defined USE_SDL_MIXER
  34. Mix_OpenAudio(22050, AUDIO_S16, channels, 1024);
  35. #endif
  36. }
  37. } /* namespace lol */