Panda3D
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
FilterProperties Class Reference

Stores a configuration for a set of audio DSP filters. More...

#include "filterProperties.h"

Inheritance diagram for FilterProperties:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

Classes

struct  FilterConfig
 

Public Types

typedef pvector< FilterConfigConfigVector
 
enum  FilterType {
  FT_lowpass , FT_highpass , FT_echo , FT_flange ,
  FT_distort , FT_normalize , FT_parameq , FT_pitchshift ,
  FT_chorus , FT_sfxreverb , FT_compress
}
 

Public Member Functions

void add_chorus (PN_stdfloat drymix, PN_stdfloat wet1, PN_stdfloat wet2, PN_stdfloat wet3, PN_stdfloat delay, PN_stdfloat rate, PN_stdfloat depth)
 Add a chorus filter to the end of the DSP chain.
 
void add_compress (PN_stdfloat threshold, PN_stdfloat attack, PN_stdfloat release, PN_stdfloat gainmakeup)
 Add a compress filter to the end of the DSP chain.
 
void add_distort (PN_stdfloat level)
 Add a distort filter to the end of the DSP chain.
 
void add_echo (PN_stdfloat drymix, PN_stdfloat wetmix, PN_stdfloat delay, PN_stdfloat decayratio)
 Add a echo filter to the end of the DSP chain.
 
void add_flange (PN_stdfloat drymix, PN_stdfloat wetmix, PN_stdfloat depth, PN_stdfloat rate)
 Add a flange filter to the end of the DSP chain.
 
void add_highpass (PN_stdfloat cutoff_freq, PN_stdfloat resonance_q)
 Add a highpass filter to the end of the DSP chain.
 
void add_lowpass (PN_stdfloat cutoff_freq, PN_stdfloat resonance_q)
 Add a lowpass filter to the end of the DSP chain.
 
void add_normalize (PN_stdfloat fadetime, PN_stdfloat threshold, PN_stdfloat maxamp)
 Add a normalize filter to the end of the DSP chain.
 
void add_parameq (PN_stdfloat center_freq, PN_stdfloat bandwidth, PN_stdfloat gain)
 Add a parameq filter to the end of the DSP chain.
 
void add_pitchshift (PN_stdfloat pitch, PN_stdfloat fftsize, PN_stdfloat overlap)
 Add a pitchshift filter to the end of the DSP chain.
 
void add_sfxreverb (PN_stdfloat drylevel=0, PN_stdfloat room=-10000, PN_stdfloat roomhf=0, PN_stdfloat decaytime=1, PN_stdfloat decayhfratio=0.5, PN_stdfloat reflectionslevel=-10000, PN_stdfloat reflectionsdelay=0.02, PN_stdfloat reverblevel=0, PN_stdfloat reverbdelay=0.04, PN_stdfloat diffusion=100, PN_stdfloat density=100, PN_stdfloat hfreference=5000, PN_stdfloat roomlf=0, PN_stdfloat lfreference=250)
 Add a reverb filter to the end of the DSP chain.
 
void clear ()
 Removes all DSP postprocessing.
 
virtual TypeHandle force_init_type ()
 
const ConfigVectorget_config ()
 Intended for use by AudioManager and AudioSound implementations: allows access to the config vector.
 
virtual TypeHandle get_type () const
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object.
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
 
void ref () const
 Explicitly increments the reference count.
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero.
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
 
virtual bool unref () const
 Explicitly decrements the reference count.
 
bool unref_if_one () const
 Atomically decreases the reference count of this object if it is one.
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object.
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object.
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count.
 

Detailed Description

Stores a configuration for a set of audio DSP filters.

Definition at line 24 of file filterProperties.h.

Member Typedef Documentation

◆ ConfigVector

Definition at line 68 of file filterProperties.h.

Member Enumeration Documentation

◆ FilterType

enum FilterProperties::FilterType

Definition at line 46 of file filterProperties.h.

Constructor & Destructor Documentation

◆ FilterProperties()

FilterProperties::FilterProperties ( )

Definition at line 21 of file filterProperties.cxx.

◆ ~FilterProperties()

FilterProperties::~FilterProperties ( )

Definition at line 29 of file filterProperties.cxx.

Member Function Documentation

◆ add_chorus()

void FilterProperties::add_chorus ( PN_stdfloat drymix,
PN_stdfloat wet1,
PN_stdfloat wet2,
PN_stdfloat wet3,
PN_stdfloat delay,
PN_stdfloat rate,
PN_stdfloat depth )
inline

Add a chorus filter to the end of the DSP chain.

Definition at line 89 of file filterProperties.I.

◆ add_compress()

void FilterProperties::add_compress ( PN_stdfloat threshold,
PN_stdfloat attack,
PN_stdfloat release,
PN_stdfloat gainmakeup )
inline

Add a compress filter to the end of the DSP chain.

Definition at line 109 of file filterProperties.I.

◆ add_distort()

void FilterProperties::add_distort ( PN_stdfloat level)
inline

Add a distort filter to the end of the DSP chain.

Definition at line 57 of file filterProperties.I.

◆ add_echo()

void FilterProperties::add_echo ( PN_stdfloat drymix,
PN_stdfloat wetmix,
PN_stdfloat delay,
PN_stdfloat decayratio )
inline

Add a echo filter to the end of the DSP chain.

Definition at line 41 of file filterProperties.I.

◆ add_flange()

void FilterProperties::add_flange ( PN_stdfloat drymix,
PN_stdfloat wetmix,
PN_stdfloat depth,
PN_stdfloat rate )
inline

Add a flange filter to the end of the DSP chain.

Definition at line 49 of file filterProperties.I.

◆ add_highpass()

void FilterProperties::add_highpass ( PN_stdfloat cutoff_freq,
PN_stdfloat resonance_q )
inline

Add a highpass filter to the end of the DSP chain.

Definition at line 33 of file filterProperties.I.

◆ add_lowpass()

void FilterProperties::add_lowpass ( PN_stdfloat cutoff_freq,
PN_stdfloat resonance_q )
inline

Add a lowpass filter to the end of the DSP chain.

Definition at line 25 of file filterProperties.I.

◆ add_normalize()

void FilterProperties::add_normalize ( PN_stdfloat fadetime,
PN_stdfloat threshold,
PN_stdfloat maxamp )
inline

Add a normalize filter to the end of the DSP chain.

Definition at line 65 of file filterProperties.I.

◆ add_parameq()

void FilterProperties::add_parameq ( PN_stdfloat center_freq,
PN_stdfloat bandwidth,
PN_stdfloat gain )
inline

Add a parameq filter to the end of the DSP chain.

Definition at line 73 of file filterProperties.I.

◆ add_pitchshift()

void FilterProperties::add_pitchshift ( PN_stdfloat pitch,
PN_stdfloat fftsize,
PN_stdfloat overlap )
inline

Add a pitchshift filter to the end of the DSP chain.

Definition at line 81 of file filterProperties.I.

◆ add_sfxreverb()

void FilterProperties::add_sfxreverb ( PN_stdfloat drylevel = 0,
PN_stdfloat room = -10000,
PN_stdfloat roomhf = 0,
PN_stdfloat decaytime = 1,
PN_stdfloat decayhfratio = 0.5,
PN_stdfloat reflectionslevel = -10000,
PN_stdfloat reflectionsdelay = 0.02,
PN_stdfloat reverblevel = 0,
PN_stdfloat reverbdelay = 0.04,
PN_stdfloat diffusion = 100,
PN_stdfloat density = 100,
PN_stdfloat hfreference = 5000,
PN_stdfloat roomlf = 0,
PN_stdfloat lfreference = 250 )
inline

Add a reverb filter to the end of the DSP chain.

Definition at line 97 of file filterProperties.I.

◆ clear()

void FilterProperties::clear ( )
inline

Removes all DSP postprocessing.

Definition at line 17 of file filterProperties.I.

◆ force_init_type()

virtual TypeHandle FilterProperties::force_init_type ( )
inlinevirtual

Reimplemented from TypedReferenceCount.

Definition at line 92 of file filterProperties.h.

◆ get_class_type()

static TypeHandle FilterProperties::get_class_type ( )
inlinestatic

Definition at line 81 of file filterProperties.h.

◆ get_config()

const FilterProperties::ConfigVector & FilterProperties::get_config ( )
inline

Intended for use by AudioManager and AudioSound implementations: allows access to the config vector.

Definition at line 118 of file filterProperties.I.

Referenced by AudioManager::configure_filters(), and AudioSound::configure_filters().

◆ get_type()

virtual TypeHandle FilterProperties::get_type ( ) const
inlinevirtual

Reimplemented from TypedReferenceCount.

Definition at line 89 of file filterProperties.h.

◆ init_type()

static void FilterProperties::init_type ( )
inlinestatic

Definition at line 84 of file filterProperties.h.


The documentation for this class was generated from the following files: