Blender V2.61 - r43446
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)
 AUD_ReadDevice (AUD_Specs specs)
virtual ~AUD_ReadDevice ()
bool read (data_t *buffer, int length)
void changeSpecs (AUD_Specs specs)

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 38 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 35 of file AUD_ReadDevice.cpp.

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

AUD_ReadDevice::AUD_ReadDevice ( AUD_Specs  specs)

Creates a new read device.

Parameters:
specsThe wanted audio specification.

Definition at line 43 of file AUD_ReadDevice.cpp.

References AUD_FORMAT_FLOAT32, AUD_SoftwareDevice::create(), AUD_DeviceSpecs::format, AUD_SoftwareDevice::m_specs, and AUD_DeviceSpecs::specs.

AUD_ReadDevice::~AUD_ReadDevice ( ) [virtual]

Closes the device.

Definition at line 52 of file AUD_ReadDevice.cpp.

References AUD_SoftwareDevice::destroy().


Member Function Documentation

void AUD_ReadDevice::changeSpecs ( AUD_Specs  specs)

Changes the output specification.

Parameters:
specsThe new audio data specification.

Definition at line 69 of file AUD_ReadDevice.cpp.

References AUD_COMPARE_SPECS, AUD_SoftwareDevice::m_specs, AUD_SoftwareDevice::setSpecs(), and AUD_DeviceSpecs::specs.

Referenced by AUD_SequencerReader::read().

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 75 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 57 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_SequencerReader::read().


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