Blender  V2.59
Public Member Functions | Protected Member Functions
AUD_ReadDevice Class Reference

#include <AUD_ReadDevice.h>

Inheritance diagram for AUD_ReadDevice:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 AUD_ReadDevice (AUD_DeviceSpecs specs)
virtual ~AUD_ReadDevice ()
bool read (data_t *buffer, int length)

Protected Member Functions

virtual void playing (bool playing)

Detailed Description

This device enables to let the user read raw data out of it.

Definition at line 40 of file AUD_ReadDevice.h.


Constructor & Destructor Documentation

AUD_ReadDevice::AUD_ReadDevice ( AUD_DeviceSpecs  specs)

Creates a new read device.

Parameters:
specsThe wanted audio specification.

Definition at line 38 of file AUD_ReadDevice.cpp.

References AUD_SoftwareDevice::create(), and AUD_SoftwareDevice::m_specs.

AUD_ReadDevice::~AUD_ReadDevice ( ) [virtual]

Closes the device.

Definition at line 46 of file AUD_ReadDevice.cpp.

References AUD_SoftwareDevice::destroy().


Member Function Documentation

void AUD_ReadDevice::playing ( bool  playing) [protected, virtual]

This function tells the device, to start or pause playback.

Parameters:
playingTrue if device should playback.

Implements AUD_SoftwareDevice.

Definition at line 63 of file AUD_ReadDevice.cpp.

bool AUD_ReadDevice::read ( data_t buffer,
int  length 
)

Reads the next bytes into the supplied buffer.

Parameters:
bufferThe target buffer.
lengthThe length in samples to be filled.
Returns:
True if the reading succeeded, false if there are no sounds played back currently, in that case the buffer is filled with silence.

Definition at line 51 of file AUD_ReadDevice.cpp.

References AUD_DEVICE_SAMPLE_SIZE, AUD_FORMAT_U8, AUD_DeviceSpecs::format, AUD_SoftwareDevice::m_specs, and AUD_SoftwareDevice::mix().

Referenced by AUD_readDevice().


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