Gnash
0.8.11dev
|
An identifier for a sound sample managed by a sound_handler. More...
#include <sound_definition.h>
Public Member Functions | |
sound_sample (int id, const RunResources &r) | |
~sound_sample () | |
![]() | |
ref_counted () | |
ref_counted (const ref_counted &) | |
void | add_ref () const |
void | drop_ref () const |
long | get_ref_count () const |
Public Attributes | |
int | m_sound_handler_id |
const RunResources & | _runResources |
Additional Inherited Members | |
![]() | |
virtual | ~ref_counted () |
An identifier for a sound sample managed by a sound_handler.
Definition tags will maintain a mapping between SWF-defined id of the sound and these identifiers. A sound_definition is used only by DefineSoundTags for embedded event sounds. These sounds can be started either through the AS sound class or using a StartSoundTag. sound_definitions are not used for:
Specifying an identifier for use by sound_handler would likely be claner, anyway this is what it is currently.
NOTE that the destructor of this identifier (thus becoming a "smart" identifier) requests the currently registered sound_handler removal of the identified sound_sample. This might be the reason why it is a ref-counted thing (hard to belive...).
This is ref_counted because it is an export. TODO: check whether it really needs to be ref counted.
|
inline |
References ~sound_sample().
gnash::sound_sample::~sound_sample | ( | ) |
delete the actual sound sample from the currently registered sound handler.
References _runResources, gnash::sound::sound_handler::delete_sound(), m_sound_handler_id, gnash::key::s, and gnash::RunResources::soundHandler().
Referenced by sound_sample().
const RunResources& gnash::sound_sample::_runResources |
This is necessary because at least some sound_samples are destroyed after the movie_root has been destroyed, so that access through the VM (which assumes movie_root exists) causes a segfault.
Referenced by ~sound_sample().
int gnash::sound_sample::m_sound_handler_id |