+ std::vector<const char*> get_available_devices();
+
+ /**
+ * Get the current OpenAL vendor or rendering backend.
+ */
+ const std::string& get_vendor() { return _vendor; }
+ const std::string& get_renderer() { return _renderer; }
+
+private:
+ static int _alut_init;
+
+ bool _working;
+ bool _active;
+ bool _changed;
+ float _volume;
+
+ ALCdevice *_device;
+ ALCcontext *_context;
+
+ // Position of the listener.
+ SGVec3d _absolute_pos;
+ SGVec3d _offset_pos;
+ SGVec3d _base_pos;
+ SGGeod _geod_pos;
+
+ // Velocity of the listener.
+ SGVec3d _velocity;
+
+ // Orientation of the listener.
+ // first 3 elements are "at" vector, second 3 are "up" vector
+ SGQuatd _orientation;
+ ALfloat _at_up_vec[6];
+
+ sample_group_map _sample_groups;
+ buffer_map _buffers;
+
+ std::vector<ALuint> _free_sources;
+ std::vector<ALuint> _sources_in_use;
+
+ bool _bad_doppler;
+ std::string _renderer;
+ std::string _vendor;
+
+ bool testForALError(std::string s);
+ bool testForALCError(std::string s);
+ bool testForALUTError(std::string s);
+ bool testForError(void *p, std::string s);
+
+ void update_pos_and_orientation();
+ void update_sample_config( SGSampleGroup *sound );