HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
HephAudio::LinearPanning Class Reference

linearly increases the volume of one channel while decreasing the other one (stereo only). More...

#include <LinearPanning.h>

Inheritance diagram for HephAudio::LinearPanning:
HephAudio::PanningEffect HephAudio::AudioEffect

Public Member Functions

 LinearPanning ()
 
 LinearPanning (double factor)
 
virtual ~LinearPanning ()=default
 
virtual std::string Name () const override
 
virtual double GetFactor () const override
 
virtual void SetFactor (double factor) override
 
- Public Member Functions inherited from HephAudio::PanningEffect
virtual ~PanningEffect ()=default
 
virtual void Process (AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
 
virtual void Process (AudioBuffer &buffer)
 
virtual void Process (AudioBuffer &buffer, size_t startIndex)
 
- Public Member Functions inherited from HephAudio::AudioEffect
virtual ~AudioEffect ()=default
 
virtual bool HasMTSupport () const
 
virtual bool HasRTSupport () const
 
virtual size_t GetThreadCount () const
 
virtual void SetThreadCount (size_t threadCount)
 
virtual size_t CalculateRequiredFrameCount (size_t outputFrameCount, const AudioFormatInfo &formatInfo) const
 
virtual size_t CalculateOutputFrameCount (const AudioBuffer &buffer) const
 

Additional Inherited Members

- Protected Member Functions inherited from HephAudio::PanningEffect
 PanningEffect ()
 
virtual void ProcessST (const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
 
- Protected Member Functions inherited from HephAudio::AudioEffect
 AudioEffect ()
 
virtual void ProcessMT (const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount)
 
- Protected Attributes inherited from HephAudio::PanningEffect
double leftVolume
 
double rightVolume
 
- Protected Attributes inherited from HephAudio::AudioEffect
size_t threadCount
 

Detailed Description

linearly increases the volume of one channel while decreasing the other one (stereo only).

Constructor & Destructor Documentation

◆ LinearPanning() [1/2]

HephAudio::LinearPanning::LinearPanning ( )

creates a new instance and initializes it with default values.

◆ LinearPanning() [2/2]

HephAudio::LinearPanning::LinearPanning ( double factor)
explicit

creates a new instance and initializes it with the provided values.

Parameters
factordetermines how the channels' volume will be changed. Ranges between -1 and 1.
-1 means only the left channel will be audible and 1 means only the right channel will be audible.

◆ ~LinearPanning()

virtual HephAudio::LinearPanning::~LinearPanning ( )
virtualdefault

releases the resources and destroys the instance.

Member Function Documentation

◆ Name()

virtual std::string HephAudio::LinearPanning::Name ( ) const
overridevirtual

gets the name of the audio effect.

Implements HephAudio::AudioEffect.

◆ GetFactor()

virtual double HephAudio::LinearPanning::GetFactor ( ) const
overridevirtual

gets the panning factor.

Implements HephAudio::PanningEffect.

◆ SetFactor()

virtual void HephAudio::LinearPanning::SetFactor ( double factor)
overridevirtual

sets the panning factor.

Parameters
factordetermines how the channels' volume will be changed. Ranges between -1 and 1.
-1 means only the left channel will be audible and 1 means only the right channel will be audible.

Implements HephAudio::PanningEffect.