//
// C++-ified by Curtis Olson, started March 2001.
//
-// Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
#if defined( __APPLE__ )
# include <OpenAL/al.h>
+# include <OpenAL/alc.h>
#else
# include <AL/al.h>
+# include <AL/alc.h>
#endif
#include "sample_openal.hxx"
class SGSoundMgr
{
+ ALCdevice *dev;
+ ALCcontext *context;
+
// Position of the listener.
ALfloat listener_pos[3];
*/
bool stop( const string& refname );
+ /**
+ * set overall volume for the application.
+ * @param vol 1.0 is default, must be greater than 0
+ */
+ inline void set_volume( const ALfloat vol ) {
+ if ( vol > 0.0 ) {
+ alListenerf( AL_GAIN, vol );
+ }
+ }
+
/**
* set the position of the listener (in opengl coordinates)
*/