r8brain-free-src
High-quality pro audio sample rate converter library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
r8b::CDSPResampler16 Class Reference

The resampler class for 16-bit resampling. More...

#include <CDSPResampler.h>

Inheritance diagram for r8b::CDSPResampler16:
r8b::CDSPResampler r8b::CDSPProcessor

Public Member Functions

 CDSPResampler16 (const double SrcSampleRate, const double DstSampleRate, const int aMaxInLen, const double ReqTransBand=2.0)
 
- Public Member Functions inherited from r8b::CDSPResampler
 CDSPResampler (const double SrcSampleRate, const double DstSampleRate, const int aMaxInLen, const double ReqTransBand=2.0, const double ReqAtten=206.91, const EDSPFilterPhaseResponse ReqPhase=fprLinearPhase)
 
virtual void clear ()
 
virtual int getInLenBeforeOutPos (const int ReqOutPos) const
 
int getInLenBeforeOutStart (const int ReqOutPos=0)
 
int getInputRequiredForOutput (const int ReqOutSamples) const
 
virtual int getLatency () const
 
virtual double getLatencyFrac () const
 
virtual int getMaxOutLen (const int) const
 
template<typename Tin , typename Tout >
void oneshot (const Tin *ip, int iplen, Tout *op, int oplen)
 
virtual int process (double *ip0, int l, double *&op0)
 
virtual void clear ()=0
 
virtual int getInLenBeforeOutPos (const int ReqOutPos) const =0
 
virtual int getLatency () const =0
 
virtual double getLatencyFrac () const =0
 
virtual int getMaxOutLen (const int MaxInLen) const =0
 
virtual int process (double *ip, int l0, double *&op0)=0
 

Detailed Description

The resampler class for 16-bit resampling.

This class defines resampling parameters suitable for 16-bit resampling, using linear-phase low-pass filter. See the r8b::CDSPResampler class for details.

Constructor & Destructor Documentation

◆ CDSPResampler16()

r8b::CDSPResampler16::CDSPResampler16 ( const double  SrcSampleRate,
const double  DstSampleRate,
const int  aMaxInLen,
const double  ReqTransBand = 2.0 
)

Constructor initializes the 16-bit resampler. See the r8b::CDSPResampler class for details.

Parameters
SrcSampleRateSource signal's sample rate.
DstSampleRateDestination signal's sample rate.
aMaxInLenThe maximal planned length of the input buffer (in samples) that will be passed to the resampler.
ReqTransBandRequired transition band, in percent.