// Copyright (C) 2012-2014 ChaosForge Ltd // http://chaosforge.org/ // // This file is part of NV Libraries. // For conditions of distribution and use, see copyright notice in nv.hh /** * @file sdl_audio.hh * @author Kornel Kisielewicz epyon@chaosforge.org * @brief SDL Audio interface */ #ifndef NV_SDL_AUDIO_HH #define NV_SDL_AUDIO_HH #include #include namespace nv { namespace sdl { struct sound_info { void* sdl_sound; }; class audio : public nv::audio { public: audio(); virtual channel play_sound( sound a_sound, float volume = 1.0f, float pan = 0.0f ); virtual channel play_sound( sound a_sound, vec3 position ); virtual sound load_sound( const std::string& a_path ); virtual void release( sound a_sound ); virtual void set_orientation( vec3 forward, vec3 up ); virtual void update( vec3 position ); virtual ~audio(); private: vec3 m_position; vec3 m_forward; vec3 m_up; handle_store< sound_info, sound > m_sounds; }; } } #endif // NV_SDL_AUDIO_HH