source: trunk/nv/sdl/sdl_audio.hh @ 395

Last change on this file since 395 was 395, checked in by epyon, 10 years ago
  • bulk update copyright update include guards cleanup core/common.hh -> common.hh minor cleanups
File size: 1.2 KB
Line 
1// Copyright (C) 2012-2015 ChaosForge Ltd
2// http://chaosforge.org/
3//
4// This file is part of Nova libraries.
5// For conditions of distribution and use, see copying.txt file in root folder.
6
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
16#include <nv/common.hh>
17#include <nv/interface/audio.hh>
18
19namespace nv
20{
21
22        namespace sdl
23        {
24                struct sound_info
25                {
26                        void* sdl_sound;
27                };
28
29                class audio : public nv::audio
30                {
31                public:
32                        audio();
33                        virtual channel play_sound( sound a_sound, float volume = 1.0f, float pan = 0.0f );
34                        virtual channel play_sound( sound a_sound, vec3 position );
35                        virtual sound load_sound( const string_ref& a_path );
36                        virtual void release( sound a_sound );
37                        virtual void set_orientation( vec3 forward, vec3 up );
38                        virtual void update( vec3 position );
39                        virtual ~audio();
40                private:
41                        vec3                                  m_position;
42                        vec3                                  m_forward;
43                        vec3                                  m_up;
44                        handle_store< sound_info, sound >     m_sounds;
45                };
46        }
47}
48
49#endif // NV_SDL_AUDIO_HH
Note: See TracBrowser for help on using the repository browser.