source: trunk/nv/fmod/fmod_audio.hh @ 543

Last change on this file since 543 was 543, checked in by epyon, 8 years ago
  • fixes in handle store
  • removal of get_handle
  • indices instead of handles
  • efficient handle store clears
File size: 1.2 KB
Line 
1// Copyright (C) 2012-2017 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 fmod_audio.hh
9 * @author Kornel Kisielewicz epyon@chaosforge.org
10 * @brief FMOD Audio interface
11 */
12
13#ifndef NV_FMOD_AUDIO_HH
14#define NV_FMOD_AUDIO_HH
15
16#include <nv/common.hh>
17#include <nv/interface/audio.hh>
18#include <nv/stl/handle_store.hh>
19
20namespace nv
21{
22
23        namespace fmod
24        {
25                class audio;
26
27                struct sound_info
28                {
29                        void* fmod_sound;
30                };
31
32                class audio : public nv::audio
33                {
34                public:
35                        audio();
36                        virtual channel play_sound( sound a_sound, float volume = 1.0f, float pan = 0.0f );
37                        virtual channel play_sound( sound a_sound, vec3 position );
38                        virtual sound load_sound( const string_view& a_path );
39                        virtual void release( sound a_sound );
40                        virtual void set_orientation( vec3 forward, vec3 up );
41                        virtual void update( vec3 position );
42                        virtual ~audio();
43                private:
44                        void release( sound_info* info );
45
46                        handle_store< sound_info, sound >     m_sounds;
47                        vec3                                  m_position;
48                        void* m_system;
49                };
50        }
51}
52
53#endif // NV_FMOD_AUDIO_HH
Note: See TracBrowser for help on using the repository browser.