Panda3D
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. More...
 
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. More...
 
void add_distort (PN_stdfloat level)
 Add a distort filter to the end of the DSP chain. More...
 
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. More...
 
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. More...
 
void add_highpass (PN_stdfloat cutoff_freq, PN_stdfloat resonance_q)
 Add a highpass filter to the end of the DSP chain. More...
 
void add_lowpass (PN_stdfloat cutoff_freq, PN_stdfloat resonance_q)
 Add a lowpass filter to the end of the DSP chain. More...
 
void add_normalize (PN_stdfloat fadetime, PN_stdfloat threshold, PN_stdfloat maxamp)
 Add a normalize filter to the end of the DSP chain. More...
 
void add_parameq (PN_stdfloat center_freq, PN_stdfloat bandwidth, PN_stdfloat gain)
 Add a parameq filter to the end of the DSP chain. More...
 
void add_pitchshift (PN_stdfloat pitch, PN_stdfloat fftsize, PN_stdfloat overlap)
 Add a pitchshift filter to the end of the DSP chain. More...
 
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. More...
 
void clear ()
 Removes all DSP postprocessing. More...
 
virtual TypeHandle force_init_type ()
 
const ConfigVectorget_config ()
 Intended for use by AudioManager and AudioSound implementations: allows access to the config vector. More...
 
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. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
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. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

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. More...
 
- 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. More...
 

Detailed Description

Stores a configuration for a set of audio DSP filters.

Definition at line 24 of file filterProperties.h.

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 90 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 110 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 58 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 42 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 50 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 34 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 26 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 66 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 74 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 82 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 98 of file filterProperties.I.

◆ clear()

void FilterProperties::clear ( )
inline

Removes all DSP postprocessing.

Definition at line 18 of file filterProperties.I.

◆ 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 119 of file filterProperties.I.

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


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