This interface represents a playable sound object, which can reference a number of IBuffer objects to play back. More...

#include "murl_audio_i_playable.h"

Inherited by Murl::Audio::Al11::Playable, and Murl::Audio::Dummy::Playable.

Public Member Functions

virtual IObjectGetObjectInterface ()=0
 Get the mutable Audio::IObject interface. More...
 
virtual const IObjectGetObjectInterface () const =0
 Get the constant Audio::IObject interface. More...
 
virtual Bool Play (const Matrix &worldTransform, Double time)=0
 Trigger playback for a single frame. More...
 
virtual Bool Stop ()=0
 Stop playback. More...
 
virtual Bool SetEndlessLoopEnabled (Bool enabled)=0
 Enable/disable endless looping. More...
 
virtual Bool IsEndlessLoopEnabled () const =0
 Check if endless looping is enabled. More...
 
virtual Bool SetSampleFormat (IEnums::SampleFormat format)=0
 Set the desired output sample format. More...
 
virtual IEnums::SampleFormat GetSampleFormat () const =0
 Get the output sample format. More...
 
virtual Bool SetMaxNumberOfStreamBuffers (UInt32 maxNumBuffers)=0
 Set the maximum number of stream buffers used during playback. More...
 
virtual UInt32 GetMaxNumberOfStreamBuffers () const =0
 Get the maximum number of stream buffers used during playback. More...
 
virtual Bool SetVolume (Real volume)=0
 Set the playable's actual volume. More...
 
virtual Real GetVolume () const =0
 Get the playable's actual volume. More...
 
virtual Bool SetReferenceDistance (Real referenceDistance)=0
 Set the reference distance. More...
 
virtual Real GetReferenceDistance () const =0
 Get the reference distance. More...
 
virtual Bool SetRolloffFactor (Real rolloffFactor)=0
 Set the rolloff factor. More...
 
virtual Real GetRolloffFactor () const =0
 Get the rolloff factor. More...
 
virtual Bool SetMaxDistance (Real maxDistance)=0
 Set the maximum distance. More...
 
virtual Real GetMaxDistance () const =0
 Get the maximum distance. More...
 
virtual Bool ClearBuffers ()=0
 Detach all buffers from the playable object. More...
 
virtual Bool AddBuffer (IBuffer *buffer)=0
 Attach a buffer to the playable object's buffer sequence. More...
 
virtual UInt32 GetNumberOfBuffers () const =0
 Get the number of currently attached buffer objects. More...
 
virtual IBufferGetBuffer (UInt32 index) const =0
 Get the buffer attached at a given index. More...
 
virtual Double GetBufferStartTime (UInt32 index) const =0
 Get the actual start time of an attached buffer in the sequence. More...
 
virtual Bool HasDataToPlay () const =0
 Check if the playable actually has data to play back. More...
 

Detailed Description

This interface represents a playable sound object, which can reference a number of IBuffer objects to play back.

Used internally by Graph::AudioSequence.

Member Function Documentation

◆ GetObjectInterface() [1/2]

virtual IObject* Murl::Audio::IPlayable::GetObjectInterface ( )
pure virtual

Get the mutable Audio::IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Audio::IPlayable::GetObjectInterface ( ) const
pure virtual

Get the constant Audio::IObject interface.

Returns
The IObject interface.

◆ Play()

virtual Bool Murl::Audio::IPlayable::Play ( const Matrix worldTransform,
Double  time 
)
pure virtual

Trigger playback for a single frame.

Parameters
worldTransformThe current transform of the object in 3D space.
timeThe current playback time.
Returns
true if successful.

◆ Stop()

virtual Bool Murl::Audio::IPlayable::Stop ( )
pure virtual

Stop playback.

Returns
true if successful.

◆ SetEndlessLoopEnabled()

virtual Bool Murl::Audio::IPlayable::SetEndlessLoopEnabled ( Bool  enabled)
pure virtual

Enable/disable endless looping.

Parameters
enabledIf true, endless looping is enabled.
Returns
true if successful.

◆ IsEndlessLoopEnabled()

virtual Bool Murl::Audio::IPlayable::IsEndlessLoopEnabled ( ) const
pure virtual

Check if endless looping is enabled.

Returns
true if endless looping is enabled.

◆ SetSampleFormat()

virtual Bool Murl::Audio::IPlayable::SetSampleFormat ( IEnums::SampleFormat  format)
pure virtual

Set the desired output sample format.

Parameters
formatThe sample format.
Returns
true if successful.

◆ GetSampleFormat()

virtual IEnums::SampleFormat Murl::Audio::IPlayable::GetSampleFormat ( ) const
pure virtual

Get the output sample format.

Returns
The sample format.

◆ SetMaxNumberOfStreamBuffers()

virtual Bool Murl::Audio::IPlayable::SetMaxNumberOfStreamBuffers ( UInt32  maxNumBuffers)
pure virtual

Set the maximum number of stream buffers used during playback.

Parameters
maxNumBuffersThe maximum number of stream buffers.
Returns
true if successful.

◆ GetMaxNumberOfStreamBuffers()

virtual UInt32 Murl::Audio::IPlayable::GetMaxNumberOfStreamBuffers ( ) const
pure virtual

Get the maximum number of stream buffers used during playback.

Returns
The maximum number of stream buffers.

◆ SetVolume()

virtual Bool Murl::Audio::IPlayable::SetVolume ( Real  volume)
pure virtual

Set the playable's actual volume.

Parameters
volumeThe playback volume.
Returns
true if successful.

◆ GetVolume()

virtual Real Murl::Audio::IPlayable::GetVolume ( ) const
pure virtual

Get the playable's actual volume.

Returns
The playback volume.

◆ SetReferenceDistance()

virtual Bool Murl::Audio::IPlayable::SetReferenceDistance ( Real  referenceDistance)
pure virtual

Set the reference distance.

See Graph::IListener for details.

Parameters
referenceDistanceThe reference distance.
Returns
true if successful.

◆ GetReferenceDistance()

virtual Real Murl::Audio::IPlayable::GetReferenceDistance ( ) const
pure virtual

Get the reference distance.

Returns
The reference distance.

◆ SetRolloffFactor()

virtual Bool Murl::Audio::IPlayable::SetRolloffFactor ( Real  rolloffFactor)
pure virtual

Set the rolloff factor.

See Graph::IListener for details.

Parameters
rolloffFactorThe rolloff factor.
Returns
true if successful.

◆ GetRolloffFactor()

virtual Real Murl::Audio::IPlayable::GetRolloffFactor ( ) const
pure virtual

Get the rolloff factor.

Returns
The rolloff factor.

◆ SetMaxDistance()

virtual Bool Murl::Audio::IPlayable::SetMaxDistance ( Real  maxDistance)
pure virtual

Set the maximum distance.

See Graph::IListener for details.

Parameters
maxDistanceThe maximum distance.
Returns
true if successful.

◆ GetMaxDistance()

virtual Real Murl::Audio::IPlayable::GetMaxDistance ( ) const
pure virtual

Get the maximum distance.

Returns
The maximum distance.

◆ ClearBuffers()

virtual Bool Murl::Audio::IPlayable::ClearBuffers ( )
pure virtual

Detach all buffers from the playable object.

Returns
true if successful.

◆ AddBuffer()

virtual Bool Murl::Audio::IPlayable::AddBuffer ( IBuffer buffer)
pure virtual

Attach a buffer to the playable object's buffer sequence.

Parameters
bufferThe buffer to add.
Returns
true if successful.

◆ GetNumberOfBuffers()

virtual UInt32 Murl::Audio::IPlayable::GetNumberOfBuffers ( ) const
pure virtual

Get the number of currently attached buffer objects.

Returns
The number of buffers.

◆ GetBuffer()

virtual IBuffer* Murl::Audio::IPlayable::GetBuffer ( UInt32  index) const
pure virtual

Get the buffer attached at a given index.

Parameters
indexThe index, from 0 to GetNumberOfBuffers()-1.
Returns
The buffer, or null if the index is out of range.

◆ GetBufferStartTime()

virtual Double Murl::Audio::IPlayable::GetBufferStartTime ( UInt32  index) const
pure virtual

Get the actual start time of an attached buffer in the sequence.

Parameters
indexThe index, from 0 to GetNumberOfBuffers()-1.
Returns
The start time, or 0.0 if the index is out of range.

◆ HasDataToPlay()

virtual Bool Murl::Audio::IPlayable::HasDataToPlay ( ) const
pure virtual

Check if the playable actually has data to play back.

Returns
true if playback data is present.

The documentation for this interface was generated from the following file:
  • murl_audio_i_playable.h


Copyright © 2011-2024 Spraylight GmbH.