clan::SoundProvider_Raw Class Reference - ClanLib SDK
Description: clan::SoundProvider_Raw Class Reference

Public Member Functions | Friends | List of all members
clan::SoundProvider_Raw Class Reference
clanSound Sound Providers

Sound provider in a raw PCM format (no header in file). More...

`#include <soundprovider_raw.h>`

Inheritance diagram for clan::SoundProvider_Raw:

## Public Member Functions
| 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.
| ~SoundProvider_Raw () override
SoundProvider_Session * | begin_session () override
| Called by SoundBuffer when a new session starts.
void | end_session (SoundProvider_Session *session) override
| Called by SoundBuffer when a session has finished. After this call,.
Public Member Functions inherited from clan::SoundProvider
| SoundProvider ()
virtual | ~SoundProvider ()

## Friends
class | SoundProvider_Raw_Session

## Detailed Description

Sound provider in a raw PCM format (no header in file).

## Constructor & Destructor Documentation

## ◆ 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()

clan::SoundProvider_Raw::~SoundProvider_Raw | ( |  | ) |
| override

## Member Function Documentation

## ◆ begin_session()

SoundProvider_Session * clan::SoundProvider_Raw::begin_session | ( |  | ) |
| overridevirtual

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

void clan::SoundProvider_Raw::end_session | ( | SoundProvider_Session * | session | ) |
| overridevirtual

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.

## Friends And Related Symbol Documentation

## ◆ SoundProvider_Raw_Session

friend class SoundProvider_Raw_Session
| friend

References SoundProvider_Raw_Session.

Referenced by SoundProvider_Raw_Session.

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

- soundprovider_raw.h