Last change
on this file since 530 was
530,
checked in by epyon, 8 years ago
|
- handle split to index_table.hh handle_manager.hh and handle_store.hh
|
File size:
1.2 KB
|
Rev | Line | |
---|
[395] | 1 | // Copyright (C) 2012-2015 ChaosForge Ltd
|
---|
[194] | 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
[395] | 4 | // This file is part of Nova libraries.
|
---|
| 5 | // For conditions of distribution and use, see copying.txt file in root folder.
|
---|
| 6 |
|
---|
[194] | 7 | /**
|
---|
| 8 | * @file sdl_audio.hh
|
---|
| 9 | * @author Kornel Kisielewicz epyon@chaosforge.org
|
---|
| 10 | * @brief SDL Audio interface
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef NV_SDL_AUDIO_HH
|
---|
| 14 | #define NV_SDL_AUDIO_HH
|
---|
| 15 |
|
---|
[395] | 16 | #include <nv/common.hh>
|
---|
[194] | 17 | #include <nv/interface/audio.hh>
|
---|
[530] | 18 | #include <nv/stl/handle_store.hh>
|
---|
[194] | 19 |
|
---|
| 20 | namespace nv
|
---|
| 21 | {
|
---|
| 22 |
|
---|
| 23 | namespace sdl
|
---|
| 24 | {
|
---|
[329] | 25 | struct sound_info
|
---|
[194] | 26 | {
|
---|
[329] | 27 | void* sdl_sound;
|
---|
[194] | 28 | };
|
---|
| 29 |
|
---|
| 30 | class audio : public nv::audio
|
---|
| 31 | {
|
---|
| 32 | public:
|
---|
| 33 | audio();
|
---|
[330] | 34 | virtual channel play_sound( sound a_sound, float volume = 1.0f, float pan = 0.0f );
|
---|
| 35 | virtual channel play_sound( sound a_sound, vec3 position );
|
---|
[399] | 36 | virtual sound load_sound( const string_view& a_path );
|
---|
[329] | 37 | virtual void release( sound a_sound );
|
---|
[330] | 38 | virtual void set_orientation( vec3 forward, vec3 up );
|
---|
| 39 | virtual void update( vec3 position );
|
---|
[194] | 40 | virtual ~audio();
|
---|
[329] | 41 | private:
|
---|
[330] | 42 | vec3 m_position;
|
---|
| 43 | vec3 m_forward;
|
---|
| 44 | vec3 m_up;
|
---|
[347] | 45 | handle_store< sound_info, sound > m_sounds;
|
---|
[194] | 46 | };
|
---|
| 47 | }
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | #endif // NV_SDL_AUDIO_HH
|
---|
Note: See
TracBrowser
for help on using the repository browser.