---
name: "CL_Streamed_RawSample"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_Streamed_RawSample"
---

# CL\_Streamed\_RawSample(3)

Streamed sample in raw PCM format (no header).

## NAME

CL\_Streamed\_RawSample - Streamed sample in raw PCM format (no header).

## DESCRIPTION

This class providers playback support for raw PCM samples. That is just the PCM sample data, not header.

Unlike CL\_Sample\_Raw, this class doesn't load the entire PCM stream into memory. Instead it slowly loads it from disk as the data is needed. With very large samples, this is a very good idea.

If the sample is small and used a lot, you should consider using CL\_Sample\_Raw instead.

Inherited from public CL\_StreamSoundProvider

## CLASS MEMBERS

- static CL\_SoundBuffer \***create**(

  ```
   const char *filename,
  SoundFormat format,
  int frequency,
  CL_InputSourceProvider *inputprovider = NULL,
  bool looped = false)
  ```

- **CL\_Streamed\_RawSample**(

  ```
   const char *filename,
  SoundFormat format,
  int frequency,
  CL_InputSourceProvider *inputprovider = NULL,
  bool looped = false)
  ```

- virtual **~CL\_Streamed\_RawSample**()

  - virtual CL\_StreamSoundProvider\_Session \***begin\_session**()

  - virtual void **end\_session**(

  ```
  CL_StreamSoundProvider_Session *session)
  ```

## MEMBERS WITH DESCRIPTIONS

- static CL\_SoundBuffer \***create**(

  ```
   const char *filename,
  SoundFormat format,
  int frequency,
  CL_InputSourceProvider *inputprovider = NULL,
  bool looped = false)
  ```

  ```
  Parameters:
  filename - Filename of the raw PCM stream.
  frequency - Default playback frequency.
  inputprovider - Input source (datafile, regular file). If NULL
  it defaults to a regular file.
  looped - True if the streamed should be looped (stream never ends).
  ```

  ```
  Description:
  ```

  Creates a soundbuffer using this provider.

  ```
  Return value:
  ```

  The soundbuffer created.

- **CL\_Streamed\_RawSample**(

  ```
   const char *filename,
  SoundFormat format,
  int frequency,
  CL_InputSourceProvider *inputprovider = NULL,
  bool looped = false)
  ```

  ```
  Parameters:
  filename - Filename of the raw PCM stream.
  frequency - Default playback frequency.
  inputprovider - Input source (datafile, regular file). If NULL
  it defaults to a regular file.
  looped - True if the streamed should be looped (stream never ends).
  ```

  ```
  Description:
  ```

  Constructs an instance of this class.

- virtual **~CL\_Streamed\_RawSample**()

  ```
  Description:
  ```

- virtual CL\_StreamSoundProvider\_Session \***begin\_session**()

  ```
  Description:
  ```

  Called by the sound implementation when a session is begun.

- virtual void **end\_session**(

  ```
  CL_StreamSoundProvider_Session *session)
  ```

  ```
  Description:
  ```

  Called by the sound implementation just before a playback session has ended.

## SEE ALSO

- **CL\_Sample\_Raw**

  The static raw sample provider.

- **CL\_Sample**

  The static wave sample provider.

- **CL\_Streamed\_WaveSample**

  The streamed wave sample provider.

- **CL\_SoundBuffer**

  Sound playback class in ClanLib.

- **CL\_StreamSoundProvider**

  Streamed sound provider interface.

- **CL\_StaticSoundProvider**

  Static sound provider interface.

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
