Public Member Functions | Public Attributes

gnash::sound_sample Class Reference

An identifier for a sound sample managed by a sound_handler. More...

#include <sound_definition.h>

Inheritance diagram for gnash::sound_sample:
Inheritance graph
Collaboration diagram for gnash::sound_sample:
Collaboration graph

List of all members.

Public Member Functions

 sound_sample (int id, const RunResources &r)
 ~sound_sample ()

Public Attributes

int m_sound_handler_id
const RunResources_runResources

Detailed Description

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.

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...).

move definition to sound_handler.h and possibly nest inside sound_handler itself ?

This is ref_counted because it is an export. TODO: check whether it really needs to be ref counted.

Constructor & Destructor Documentation

gnash::sound_sample::sound_sample ( int  id,
const RunResources r 
) [inline]
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, s, and gnash::RunResources::soundHandler().

Member Data Documentation

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().

The documentation for this class was generated from the following files: