Frontend::Sound::Device Class Reference

Represents a session with the sound driver/adapter. More...

#include <Frontend2Sound.h>

Inheritance diagram for Frontend::Sound::Device:

Frontend::Object List of all members.

Public Member Functions

virtual BufferCreateBuffer (unsigned int size, int channels, int bitsPrSample, int samplesPrSecond)=0
 Creates a new sound buffer.
void AddRef ()
 Adds a reference to the object.
void Release ()
 Releases a reference on the object.
unsigned int GetRefCount ()
 Returns the number of references on the object.

Detailed Description

Represents a session with the sound driver/adapter.

A Device object creates sound Buffer objects, which can be written to, playd and mixed.


Member Function Documentation

void Frontend::Object::AddRef  )  [inherited]
 

Adds a reference to the object.

Aqcuires an additional ownership on the object. The object will not be deleted until all owners have called Release() on it.

See also:
Release()

virtual Buffer* Frontend::Sound::Device::CreateBuffer unsigned int  size,
int  channels,
int  bitsPrSample,
int  samplesPrSecond
[pure virtual]
 

Creates a new sound buffer.

The channels parameter describes the number of audio channels, i.e. 2=stereo. The bitsPrSample parameter describes the desired sample quality. To be frontend-capable, a device must support at least 1 and 2 channels, 8 and 16 as bitsPrSample, and 22050 and 44100 as samplesPrSecond. Other formats might also be available, depending on platform. CreateBuffer() will throw an Exception if the desired format is not supported.

Parameters:
size Size of the buffer, in bytes.
channels The number of sound channels (see above).
bitsPrSample The number of bits pr audio sample (see above).

unsigned int Frontend::Object::GetRefCount  )  [inline, inherited]
 

Returns the number of references on the object.

Returns:
The number of references on the object.

void Frontend::Object::Release  )  [inherited]
 

Releases a reference on the object.

If you are an owner of an object, use this function to release it when you are done with it. The object will not be deleted until all owners have called Release() on it.


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