29 namespace cinder {
namespace audio {
64 void connect(
const NodeRef &output )
override;
bool checkNotClipping()
Implementations should call this to detect if the internal audio buffer is clipping. Always returns false if clip detection is disabled.
Definition: OutputNode.cpp:65
uint64_t getLastClip()
Returns the frame of the last buffer clip or 0 if none since the last time this method was called...
Definition: OutputNode.cpp:50
Base class for Node's that consume an audio signal, for example speakers. It cannot have any outputs...
Definition: OutputNode.h:35
virtual size_t getOutputFramesPerBlock()=0
Returns the output frames per block, which governs the current context.
OutputNode(const Format &format=Format())
Definition: OutputNode.cpp:38
bool mWasEnabledBeforeParamsChange
Definition: OutputNode.h:90
bool isClipDetectionEnabled() const
Returns whether clip detection is enabled or not.
Definition: OutputNode.h:48
virtual void deviceParamsDidChange()
Definition: OutputNode.cpp:112
std::shared_ptr< class OutputDeviceNode > OutputDeviceNodeRef
Definition: OutputNode.h:32
virtual ~OutputNode()
Definition: OutputNode.h:37
virtual size_t getOutputSampleRate()=0
Returns the output samplerate, which governs the current context.
float mClipThreshold
Definition: OutputNode.h:60
void enableClipDetection(bool enable=true, float threshold=2)
Definition: OutputNode.cpp:57
signals::scoped_connection mWillChangeConn
Definition: OutputNode.h:91
Interface representing a Node that communicates with a hardware output device. This is typically spea...
Definition: OutputNode.h:71
bool mClipDetectionEnabled
Definition: OutputNode.h:59
std::shared_ptr< class Device > DeviceRef
Definition: Device.h:36
Fundamental building block for creating an audio processing graph.
Definition: Node.h:59
const DeviceRef & getDevice() const
Returns a shared_ptr to the Device that this OutputDeviceNode operates.
Definition: OutputNode.h:76
DeviceRef mDevice
Definition: OutputNode.h:89
std::atomic< uint64_t > mLastClip
Definition: OutputNode.h:58
virtual ~OutputDeviceNode()
Definition: OutputNode.h:73
signals::scoped_connection mDidChangeConn
Definition: OutputNode.h:91
void enable()
Enables this Node for processing. Same as setEnabled( true ).
Definition: Node.cpp:165
OutputDeviceNode(const DeviceRef &device, const Format &format=Format())
Definition: OutputNode.cpp:82
GLenum GLsizei GLenum format
Definition: GLee.h:969
size_t getOutputSampleRate() override
Implemented to return the samplerate of the owned Device.
Definition: OutputNode.h:79
std::shared_ptr< class Node > NodeRef
Definition: Node.h:39
virtual void deviceParamsWillChange()
Definition: OutputNode.cpp:104
std::shared_ptr< class OutputNode > OutputNodeRef
Definition: OutputNode.h:31
void threshold(SurfaceT< T > *surface, T value, const Area &area)
Thresholds surface setting any values below value to zero and any values above to unity inside the Ar...
Definition: Threshold.cpp:100
size_t getOutputFramesPerBlock() override
Implemented to return the frames per block of the owned Device.
Definition: OutputNode.h:81