#include <vector>
#include <simgear/compiler.h>
-#include <simgear/props/condition.hxx>
+#include <simgear/props/propsfwd.hxx>
+
+#include "sample_group.hxx"
#include "sample_openal.hxx"
-#include "soundmgr_openal.hxx"
static const double MAX_TRANSIT_TIME = 0.1; // 100 ms.
* @param root The root node of the programs property tree.
* @param child A pointer to the location of the current event as defined
* in the configuration file.
- * @param sndmgr A pointer to a pre-initialized sound manager class.
+ * @param sgrp A pointer to a pre-initialized sample group class.
+ * @param avionics A pointer to the pre-initialized avionics sample group.
* @param path The path where the audio files remain.
*/
- virtual void init (SGPropertyNode *, SGPropertyNode *, SGSoundMgr *,
- const string &);
+ virtual void init (SGPropertyNode *, SGPropertyNode *, SGSampleGroup *,
+ SGSampleGroup *, const SGPath& currentDir);
/**
* Check whether an event has happened and if action has to be taken.
private:
- SGSoundMgr * _mgr;
+ SGSampleGroup * _sgrp;
SGSharedPtr<SGSoundSample> _sample;
SGSharedPtr<SGCondition> _condition;
double _dt_play;
double _dt_stop;
double _delay; // time after which the sound should be started (default: 0)
- double _stopping; // time after the sound should have stopped.
- // This is useful for lost packets in in-transit mode.
+ double _stopping; // time after the sound should have stopped.
+ // This is useful for lost packets in in-transit mode.
+ bool _initialized;
std::vector<_snd_prop> _volume;
std::vector<_snd_prop> _pitch;
-
};
#endif // _SG_SOUND_HXX