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
RevLine 
[530]1// Copyright (C) 2012-2017 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 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
[395]16#include <nv/common.hh>
[194]17#include <nv/interface/audio.hh>
[530]18#include <nv/stl/handle_store.hh>
[194]19
20namespace nv
21{
22
23        namespace fmod
24        {
25                class audio;
26
[329]27                struct sound_info
[194]28                {
[329]29                        void* fmod_sound;
[194]30                };
31
32                class audio : public nv::audio
33                {
34                public:
35                        audio();
[330]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 );
[399]38                        virtual sound load_sound( const string_view& a_path );
[329]39                        virtual void release( sound a_sound );
[330]40                        virtual void set_orientation( vec3 forward, vec3 up );
41                        virtual void update( vec3 position );
[194]42                        virtual ~audio();
43                private:
[543]44                        void release( sound_info* info );
45
[347]46                        handle_store< sound_info, sound >     m_sounds;
[330]47                        vec3                                  m_position;
[194]48                        void* m_system;
49                };
50        }
51}
52
53#endif // NV_FMOD_AUDIO_HH
Note: See TracBrowser for help on using the repository browser.