source: trunk/src/audio.cpp @ 680

Last change on this file since 680 was 680, checked in by sam, 9 years ago

Create the SdlApp class to avoid code duplication. Ensure USE_SDL is
tested wherever relevant.

  • Property svn:keywords set to Id
File size: 661 bytes
Line 
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://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include <cmath>
16
17#if defined USE_SDL
18#   include <SDL.h>
19#   include <SDL_mixer.h>
20#endif
21
22#include "core.h"
23
24/*
25 * Public Audio class
26 */
27
28void Audio::Setup(int channels)
29{
30#if defined USE_SDL
31    Mix_OpenAudio(22050, AUDIO_S16, channels, 1024);
32#endif
33}
34
Note: See TracBrowser for help on using the repository browser.