Line | |
---|
1 | // Copyright (C) 2012-2014 ChaosForge Ltd
|
---|
2 | // http://chaosforge.org/
|
---|
3 | //
|
---|
4 | // This file is part of NV Libraries.
|
---|
5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
6 | /**
|
---|
7 | * @file sdl_audio.hh
|
---|
8 | * @author Kornel Kisielewicz epyon@chaosforge.org
|
---|
9 | * @brief SDL Audio interface
|
---|
10 | */
|
---|
11 |
|
---|
12 | #ifndef NV_SDL_AUDIO_HH
|
---|
13 | #define NV_SDL_AUDIO_HH
|
---|
14 |
|
---|
15 | #include <nv/core/common.hh>
|
---|
16 | #include <nv/interface/audio.hh>
|
---|
17 |
|
---|
18 | namespace nv
|
---|
19 | {
|
---|
20 |
|
---|
21 | namespace sdl
|
---|
22 | {
|
---|
23 | struct sound_info
|
---|
24 | {
|
---|
25 | void* sdl_sound;
|
---|
26 | };
|
---|
27 |
|
---|
28 | class audio : public nv::audio
|
---|
29 | {
|
---|
30 | public:
|
---|
31 | audio();
|
---|
32 | virtual channel play_sound( sound a_sound );
|
---|
33 | virtual sound load_sound( const std::string& a_path );
|
---|
34 | virtual void release( sound a_sound );
|
---|
35 | virtual void update();
|
---|
36 | virtual ~audio();
|
---|
37 | private:
|
---|
38 | entity_store< sound_info, sound > m_sounds;
|
---|
39 | };
|
---|
40 | }
|
---|
41 | }
|
---|
42 |
|
---|
43 | #endif // NV_SDL_AUDIO_HH
|
---|
Note: See
TracBrowser
for help on using the repository browser.