Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_StaticSoundProvider

Static Soundprovider class.
Contained in: global
Derived from: none
Derived by: CL_Sample CL_Sample_RawData
Group: Sound (Audio Mixing)

#include <ClanLib/sound.h>

### public function member index:

### Construction:

``virtual`` | `~CL_StaticSoundProvider` | `()`;

### Operations:

``virtual` `void`` | `lock` | `()`;
``virtual` `void`` | `unlock` | `()`;

### Attributes:

``virtual` `SoundFormat`` | `get_format` | `() `const``;
``virtual` `int`` | `data_size` | `() `const``;
``virtual` `void`*` | `get_data` | `() `const``;
``virtual` `int`` | `get_frequency` | `() `const``;

## Description:

The static soundprovider provides the data for any static (non-streamed) samples played using the ClanLib sound system.

## Function Member Descriptions:

CL_StaticSoundProvider::data_size - Returns the total size in bytes of the data stored.
``virtual` `int`` `data_size` `() `const``;

> Returns - Size of data stored (in bytes).

CL_StaticSoundProvider::get_data - Returns a pointer to the data stored.
``virtual` `void`*` `get_data` `() `const``;

> Returns - A pointer to the data stored.

CL_StaticSoundProvider::get_format - Returns the soundformat of the data stored by the provider.
The data stored can be either 8-bit signed, 8-bit unsigned, 16-bit signed and 16-bit unsigned.
``virtual` `SoundFormat`` `get_format` `() `const``;

> Returns - The soundformat of the data stored.

CL_StaticSoundProvider::get_frequency - Returns the frequency of the data stored.
``virtual` `int`` `get_frequency` `() `const``;

> Returns - Frequency of data stored.

CL_StaticSoundProvider::lock - Locks the soundprovider. Locking a provider means, that the contents of the provider should be available following the call to lock(), which means that lock loads any files from disk, and performs any necessary initializations.
``virtual` `void`` `lock` `()`;

CL_StaticSoundProvider::unlock - Unlocks the soundprovider. Unlocking a provider means, that the contents of the provider should be deinitialized, thus removing any loaded sample data from memory.
``virtual` `void`` `unlock` `()`;

CL_StaticSoundProvider::~CL_StaticSoundProvider - Static Sound Provider Destructor
``virtual`` `~CL_StaticSoundProvider` `()`;