Last change
on this file since 392 was
392,
checked in by epyon, 10 years ago
|
- massive shift towards nova STL
- include cleanups
|
File size:
1.2 KB
|
Rev | Line | |
---|
[319] | 1 | // Copyright (C) 2012-2014 ChaosForge Ltd
|
---|
[194] | 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 |
|
---|
[319] | 15 | #include <nv/core/common.hh>
|
---|
[194] | 16 | #include <nv/interface/audio.hh>
|
---|
| 17 |
|
---|
| 18 | namespace nv
|
---|
| 19 | {
|
---|
| 20 |
|
---|
| 21 | namespace sdl
|
---|
| 22 | {
|
---|
[329] | 23 | struct sound_info
|
---|
[194] | 24 | {
|
---|
[329] | 25 | void* sdl_sound;
|
---|
[194] | 26 | };
|
---|
| 27 |
|
---|
| 28 | class audio : public nv::audio
|
---|
| 29 | {
|
---|
| 30 | public:
|
---|
| 31 | audio();
|
---|
[330] | 32 | virtual channel play_sound( sound a_sound, float volume = 1.0f, float pan = 0.0f );
|
---|
| 33 | virtual channel play_sound( sound a_sound, vec3 position );
|
---|
[392] | 34 | virtual sound load_sound( const string_ref& a_path );
|
---|
[329] | 35 | virtual void release( sound a_sound );
|
---|
[330] | 36 | virtual void set_orientation( vec3 forward, vec3 up );
|
---|
| 37 | virtual void update( vec3 position );
|
---|
[194] | 38 | virtual ~audio();
|
---|
[329] | 39 | private:
|
---|
[330] | 40 | vec3 m_position;
|
---|
| 41 | vec3 m_forward;
|
---|
| 42 | vec3 m_up;
|
---|
[347] | 43 | handle_store< sound_info, sound > m_sounds;
|
---|
[194] | 44 | };
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | #endif // NV_SDL_AUDIO_HH
|
---|
Note: See
TracBrowser
for help on using the repository browser.