NAP
Public Member Functions | List of all members
MultiSampleBufferPlayerNode Class Reference

#include <multisamplebufferplayernode.h>

Public Member Functions

 MultiSampleBufferPlayerNode (int channel, NodeManager &manager)
 
std::vector< OutputPin * > getOutputPins ()
 
void play (DiscreteTimeValue position=0, ControllerValue speed=1.)
 
void stop ()
 
void setSpeed (ControllerValue speed)
 
void setPosition (DiscreteTimeValue position)
 
void setBuffer (SafePtr< MultiSampleBuffer > buffer)
 
ControllerValue getSpeed () const
 
DiscreteTimeValue getPosition () const
 
- Public Member Functions inherited from Node
 Node (NodeManager &manager)
 
const std::set< OutputPin * > & getOutputs () const
 
const std::set< InputPinBase * > & getInputs () const
 
- Public Member Functions inherited from Process
 Process (NodeManager &nodeManager)
 
 Process (ParentProcess &parent)
 
 Process (const Process &)=delete
 
Processoperator= (const Process &)=delete
 
virtual ~Process ()
 
void update ()
 
NodeManagergetNodeManager () const
 
int getBufferSize () const
 
float getSampleRate () const
 
DiscreteTimeValue getSampleTime () const
 

Additional Inherited Members

- Protected Member Functions inherited from Node
SampleBuffergetOutputBuffer (OutputPin &output)
 
- Protected Member Functions inherited from Process
virtual void sampleRateChanged (float sampleRate)
 
virtual void bufferSizeChanged (int bufferSize)
 
bool isRegisteredWithNodeManager () const
 

Description

The MultiSampleBufferPlayerNode plays back the sample from a MultiSampleBuffer. They key difference between the MultiSampleBufferPlayerNode and the BufferPlayerNode is that the MultiSampleBufferPlayerNode creates OutputPins for each channel of the MultiSampleBuffer

Inheritance diagram for MultiSampleBufferPlayerNode:
[legend]
Collaboration diagram for MultiSampleBufferPlayerNode:
[legend]

Constructor & Destructor Documentation

◆ MultiSampleBufferPlayerNode()

MultiSampleBufferPlayerNode ( int  channel,
NodeManager manager 
)

Member Function Documentation

◆ getOutputPins()

std::vector<OutputPin*> getOutputPins ( )

The output to connect to other nodes

◆ getPosition()

DiscreteTimeValue getPosition ( ) const
Returns
the current playback position within the source buffer.

◆ getSpeed()

ControllerValue getSpeed ( ) const
Returns
the playback speed as a fraction of the original speed of the audio material in the buffer.

◆ play()

void play ( DiscreteTimeValue  position = 0,
ControllerValue  speed = 1. 
)

Tells the node to start playback

Parameters
positionthe starting position in the source buffer in samples
speedthe playbackspeed, 1.0 means 1 sample per sample, 2 means double speed, etc.

◆ setBuffer()

void setBuffer ( SafePtr< MultiSampleBuffer buffer)

Sets the buffer to be played back from. Can't be called while playing!

Parameters
bufferSafePtr to a multichannel sample buffer

◆ setPosition()

void setPosition ( DiscreteTimeValue  position)

Sets the current position of playback while playing.

Parameters
positionin samples

◆ setSpeed()

void setSpeed ( ControllerValue  speed)

Set the playback speed

Parameters
speedas a fraction of the original speed of the audio material in the buffer.

◆ stop()

void stop ( )

Stops playback