Sound provider in a raw PCM format (no header in file).
More...
#include <soundprovider_raw.h>
Sound provider in a raw PCM format (no header in file).
◆ SoundProvider_Raw()
clan::SoundProvider_Raw::SoundProvider_Raw |
( |
void * | sound_data, |
|
|
int | num_samples, |
|
|
int | bytes_per_sample, |
|
|
bool | stereo, |
|
|
int | frequency = 22050 ) |
Constructs a sound provider based on some raw PCM data.
- Parameters
-
sound_data | Raw PCM data. |
num_samples | Number of samples to be read out of sound_data. |
bytes_per_sample | The size of a sample in bytes. This is 2 for 16 bit (signed), and 1 for 8 bit (unsigned). |
stereo | True if sound is stereo (two channels). |
frequency | Playback frequency for sample data. |
◆ ~SoundProvider_Raw()
virtual clan::SoundProvider_Raw::~SoundProvider_Raw |
( |
| ) |
|
|
virtual |
◆ begin_session()
Called by SoundBuffer when a new session starts.
- Returns
- The soundbuffer session to be attached to the newly started session.
Implements clan::SoundProvider.
◆ end_session()
Called by SoundBuffer when a session has finished. After this call,.
SoundBuffer will not access the session anymore. It can safely be deleted here (and in most cases should be delete here).
Implements clan::SoundProvider.
◆ SoundProvider_Raw_Session
friend class SoundProvider_Raw_Session |
|
friend |
The documentation for this class was generated from the following file: