Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • develop protected
  • feature/triangulation-qhull
  • jst
  • ti_lab_build
  • features/splines_and_piecewise_polynomials
  • ma_2018/erraji
  • fabian
  • ITABase_v2024a
  • VA_v2023b
  • VA_v2023a
  • VA_v2022a
  • before_cmake_rework
  • v2021.a
  • v2020.a
  • v2019.a
  • v2018.b
  • v2018.a
  • v2017.d
  • v2017.c
  • v2017.b
  • v2017.a
  • v2016.a
23 results

ITAMultichannelFiniteImpulseResponse.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ITAMultichannelFiniteImpulseResponse.h 3.16 KiB
    /*
     * ----------------------------------------------------------------
     *
     *		ITA core libs
     *		(c) Copyright Institute of Technical Acoustics (ITA)
     *		RWTH Aachen University, Germany, 2015-2024
     *
     * ----------------------------------------------------------------
     *				    ____  __________  _______
     *				   //  / //__   ___/ //  _   |
     *				  //  /    //  /    //  /_|  |
     *				 //  /    //  /    //  ___   |
     *				//__/    //__/    //__/   |__|
     *
     * ----------------------------------------------------------------
     *
     */
    
    #ifndef INCLUDE_WATCHER_ITA_MULTICHANNEL_FINITE_IMPULSE_RESPONSE
    #define INCLUDE_WATCHER_ITA_MULTICHANNEL_FINITE_IMPULSE_RESPONSE
    
    // ITABase
    #include <ITABaseDefinitions.h>
    #include <ITASampleFrame.h>
    
    namespace ITABase
    {
    	//! Multichannel finite impulse response class / FIR filters
    	/**
    	 * ITASampleFrame with a sampling rate = multichannel finite impulse response.
    	 */
    	class ITA_BASE_API CMultichannelFiniteImpulseResponse : public ITASampleFrame
    	{
    	public:
    		//! Create empty FIR filters
    		/**
    		 * Requires initialization to be used, otherwise methods will throw ITAException.
    		 */
    		CMultichannelFiniteImpulseResponse( );
    
    		//! Create FIR filter of certain size with given sampling frequency
    		/**
    		 * \param iLength	Length (size) of buffer in samples
    		 */
    		explicit CMultichannelFiniteImpulseResponse( const int iNumChannels, const int iLength, const double dSampleRate, const bool bZeroInit = true );
    
    		//! Copy constructor as pointer
    		/**
    		 * \param pSource Pointer to source buffer
    		 */
    		CMultichannelFiniteImpulseResponse( const CMultichannelFiniteImpulseResponse* pSource );
    
    		//! Copy constructor as reference
    		/**
    		 * \param pbSource Reference to source buffer
    		 */
    		CMultichannelFiniteImpulseResponse( const CMultichannelFiniteImpulseResponse& sbSource );
    
    		virtual inline ~CMultichannelFiniteImpulseResponse( ) { };
    
    		//! Load from file constructor (audiofile)
    		/**
    		 * Loads FIR data from an audio file.
    		 *
    		 * @note Will throw ITAException on error.
    		 */
    		CMultichannelFiniteImpulseResponse( const std::string& sFilePath );
    
    		//! Loads FIR from file (will re-init length, if necessary)
    		void LoadFromFile( const std::string& sFilePath );