Go to the documentation of this file.
20 #ifndef SOUND_EMBEDSOUND_H
21 #define SOUND_EMBEDSOUND_H
79 const std::uint8_t*
data()
const {
88 const std::uint8_t*
data(
size_t pos)
const {
89 assert(pos < _buf->
size());
90 return _buf->data()+pos;
141 unsigned int inPoint,
unsigned int outPoint,
180 std::unique_ptr<SimpleBuffer> _buf;
190 mutable std::mutex _soundInstancesMutex;
196 #endif // SOUND_EMBEDSOUND_H
@ d
Definition: GnashKey.h:150
Instances::iterator eraseActiveSound(Instances::iterator i)
Drop an active sound (by iterator)
Definition: EmbedSound.cpp:53
Definition of an embedded sound.
Definition: EmbedSound.h:50
#define MAX_MODES
Definition: eglinfo.c:35
media::SoundInfo soundinfo
Object holding information about the sound.
Definition: EmbedSound.h:171
@ i
Definition: GnashKey.h:155
bool isPlaying() const
Are there known playing instances of this sound ?
Definition: EmbedSound.cpp:97
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
#define UNUSED
Definition: eglinfo.c:42
void clearInstances()
Drop all active sounds.
Definition: EmbedSound.cpp:46
#define MAX_CONFIGS
Definition: eglinfo.c:34
std::unique_ptr< EmbedSoundInst > createInstance(media::MediaHandler &mh, unsigned int inPoint, unsigned int outPoint, const SoundEnvelopes *envelopes, int loopCount)
Create an instance of this sound.
Definition: EmbedSound.cpp:60
void log_error(StringType msg, Args... args)
Definition: log.h:283
@ volume
Definition: klash_part.cpp:331
@ r
Definition: GnashKey.h:164
size_t size() const
Return size of the data buffer.
Definition: EmbedSound.h:69
@ h
Definition: GnashKey.h:154
Instance of a defined sound (EmbedSound)
Definition: EmbedSoundInst.h:46
~EmbedSound()
Definition: EmbedSound.cpp:75
EmbedSound(std::unique_ptr< SimpleBuffer > data, media::SoundInfo info, int volume)
Construct a sound with given data, info and volume.
Definition: EmbedSound.cpp:35
EmbedSoundInst * firstPlayingInstance() const
Return the first created instance of this sound.
Definition: EmbedSound.cpp:111
int volume
Definition: EmbedSound.h:175
int main(int argc UNUSED, char **argv UNUSED)
Definition: eglinfo.c:152
const std::uint8_t * data(size_t pos) const
Return a pointer to an offset in the underlying buffer.
Definition: EmbedSound.h:88
#define MAX_SCREENS
Definition: eglinfo.c:36
size_t numPlayingInstances() const
Return number of playing instances of this sound.
Definition: EmbedSound.cpp:104
std::vector< SoundEnvelope > SoundEnvelopes
A vector of SoundEnvelope objects.
Definition: SoundEnvelope.h:60
const std::uint8_t * data() const
Return a pointer to the underlying buffer.
Definition: EmbedSound.h:79
void getPlayingInstances(std::vector< InputStream * > &to) const
Append to the given vector all playing instances of this sound def.
Definition: EmbedSound.cpp:118
bool empty() const
Is the data buffer empty ?
Definition: EmbedSound.h:74
std::list< EmbedSoundInst * > Instances
Vector containing the active instances of this sounds being played.
Definition: EmbedSound.h:56
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
A simple buffer of bytes.
Definition: SimpleBuffer.h:38