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::SineLawPanning Class Reference

increases the volume of one channel while decreasing the other one (stereo only). Uses sin function to calculate the volumes. More...

#include <SineLawPanning.h>

Inheritance diagram for HephAudio::SineLawPanning:
HephAudio::PanningEffect HephAudio::AudioEffect

Public Member Functions

 SineLawPanning ()
 
 SineLawPanning (double factor)
 
virtual ~SineLawPanning ()=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

increases the volume of one channel while decreasing the other one (stereo only). Uses sin function to calculate the volumes.

Constructor & Destructor Documentation

◆ SineLawPanning() [1/2]

HephAudio::SineLawPanning::SineLawPanning ( )

creates a new instance and initializes it with default values.

◆ SineLawPanning() [2/2]

HephAudio::SineLawPanning::SineLawPanning ( 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.

◆ ~SineLawPanning()

virtual HephAudio::SineLawPanning::~SineLawPanning ( )
virtualdefault

releases the resources and destroys the instance.

Member Function Documentation

◆ Name()

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

gets the name of the audio effect.

Implements HephAudio::AudioEffect.

◆ GetFactor()

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

gets the panning factor.

Implements HephAudio::PanningEffect.

◆ SetFactor()

virtual void HephAudio::SineLawPanning::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.