mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
build 200108. sound start offset support, default coupler sound naming cleanup, minor bug fixes
This commit is contained in:
11
sound.h
11
sound.h
@@ -102,6 +102,11 @@ public:
|
||||
name( std::string Name );
|
||||
std::string const &
|
||||
name() const;
|
||||
// playback starting point shift setter/getter
|
||||
void
|
||||
start( float const Offset );
|
||||
float const &
|
||||
start() const;
|
||||
// returns true if there isn't any sound buffer associated with the object, false otherwise
|
||||
bool
|
||||
empty() const;
|
||||
@@ -204,7 +209,8 @@ private:
|
||||
std::string m_name;
|
||||
int m_flags {}; // requested playback parameters
|
||||
sound_properties m_properties; // current properties of the emitted sounds
|
||||
float m_pitchvariation {}; // emitter-specific shift in base pitch
|
||||
float m_pitchvariation {}; // emitter-specific shift for base pitch
|
||||
float m_startoffset {}; // emitter-specific shift for playback starting point
|
||||
bool m_stop { false }; // indicates active sample instances should be terminated
|
||||
/*
|
||||
bool m_stopend { false }; // indicates active instances of optional ending sound should be terminated
|
||||
@@ -225,6 +231,9 @@ inline glm::vec3 const & sound_source::offset() const { return m_offset; }
|
||||
// sound source name setter/getter
|
||||
inline void sound_source::name( std::string Name ) { m_name = Name; }
|
||||
inline std::string const & sound_source::name() const { return m_name; }
|
||||
// playback starting point shift setter/getter
|
||||
inline void sound_source::start( float const Offset ) { m_startoffset = Offset; }
|
||||
inline float const & sound_source::start() const { return m_startoffset; }
|
||||
|
||||
// collection of sound sources present in the scene
|
||||
class sound_table : public basic_table<sound_source> {
|
||||
|
||||
Reference in New Issue
Block a user