iSndSysData Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iSndSysData Struct Reference
Sound system

The sound data is an interface to the container object controlling raw sound data. More...

`#include <isndsys/ss_data.h>`

Inheritance diagram for iSndSysData:

List of all members.

## Public Member Functions
virtual iSndSysStream * | CreateStream (csSndSysSoundFormat *renderformat, int mode3d)=0
| This function should be called from the Renderer where a proper renderformat can be provided.
virtual size_t | GetDataSize ()=0
| Return the size of the data stored in bytes.
virtual const char * | GetDescription ()=0
| Retrieve the description associated with this sound data.
virtual const csSndSysSoundFormat * | GetFormat ()=0
| Get the format of the sound data.
virtual size_t | GetFrameCount ()=0
| Get the count of frames of this sound data.
virtual void | SetDescription (const char *pDescription)=0
| Set an optional description to be associated with this sound data.

## Detailed Description

The sound data is an interface to the container object controlling raw sound data.

After obtaining an iSndSysData interface (most likely by loading a sound file) at least one iSndSysStream must be obtained.

This interface is implemented at least once per Sound Element.

Definition at line 44 of file ss_data.h.

## Member Function Documentation

virtual iSndSysStream* iSndSysData::CreateStream | ( | csSndSysSoundFormat * | renderformat,
|  | int | mode3d
| ) |  | `[pure virtual]`

This function should be called from the Renderer where a proper renderformat can be provided.

Creates a stream associated with this sound data positioned at the beginning of the sound data and initially paused if possible.

Remarks:
  Not intended to be called by an application.

virtual size_t iSndSysData::GetDataSize | ( |  | ) | `[pure virtual]`

Return the size of the data stored in bytes.

This is informational only and is not guaranteed to be a number usable for sound calculations. For example, an audio file compressed with variable rate compression may result in a situation where FILE_SIZE is not equal to FRAME_COUNT * FRAME_SIZE since FRAME_SIZE may vary throughout the audio data.

virtual const char* iSndSysData::GetDescription | ( |  | ) | `[pure virtual]`

Retrieve the description associated with this sound data.

virtual const csSndSysSoundFormat* iSndSysData::GetFormat | ( |  | ) | `[pure virtual]`

Get the format of the sound data.

virtual size_t iSndSysData::GetFrameCount | ( |  | ) | `[pure virtual]`

Get the count of frames of this sound data.

The count of frames is equal to the actual duration of the sound, times its frequency. So, if you want to know the duration of the sound data, you should divide the return value of this method by the frequency of the sound data.

virtual void iSndSysData::SetDescription | ( | const char * | pDescription | ) | `[pure virtual]`

Set an optional description to be associated with this sound data.

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

- isndsys/ss_data.h