# include <AL/alut.h>
#endif
+#ifndef ALC_ALL_DEVICES_SPECIFIER
+# define ALC_ALL_DEVICES_SPECIFIER 0x1013
+#endif
+
#include <simgear/compiler.h>
#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/math/SGMathFwd.hxx>
SGSoundMgr();
~SGSoundMgr();
- void init();
+ void init(const char *devname = NULL);
void bind();
void unbind();
void update(double dt);
*/
inline bool has_changed() { return _changed; }
+ /**
+ * Some implementations seem to need the velocity miltyplied by a
+ * factor of 100 to make them distinct. I've not found if this is
+ * a problem in the implementation or in out code. Until then
+ * this function is used to detect the problematic implementations.
+ */
+ inline bool bad_doppler_effect() { return _bad_doppler; }
+
/**
* Load a sample file and return it's configuration and data.
* @param samplepath Path to the file to load
bool load(string &samplepath, void **data, int *format,
size_t *size, int *freq );
+ /**
+ * Get a list of available playback devices.
+ */
+ vector<const char*> get_available_devices();
+
+ /**
+ * Get the current OpenAL vendor or rendering backend.
+ */
+ const string& get_vendor() { return _vendor; }
+ const string& get_renderer() { return _renderer; }
+
private:
static int _alut_init;
vector<ALuint> _free_sources;
vector<ALuint> _sources_in_use;
- char *_devname;
+ bool _bad_doppler;
+ string _renderer;
+ string _vendor;
bool testForALError(string s);
bool testForALCError(string s);