JS8Call-Improved master
Loading...
Searching...
No Matches
Detector Class Reference
Inheritance diagram for Detector:
Collaboration diagram for Detector:

Public Member Functions

 Detector (unsigned frameRate, unsigned periodLengthInSeconds, QObject *parent=nullptr)
 Construct a new Detector object.
unsigned period () const
QMutex * getMutex ()
void setTRPeriod (unsigned p)
unsigned secondInPeriod () const
 Get the current second in the period.
void clear ()
 Clear the detector buffer.
bool reset () override
 Reset the detector state.
void resetBufferContent ()
 Reset the buffer content to zero.
void resetBufferPosition ()
 Reset the buffer position based on current time.
Q_SIGNAL void framesWritten (qint64) const
Q_SLOT void setBlockSize (unsigned)
 Set the block size for FFT processing.
Public Member Functions inherited from AudioDevice
bool initialize (OpenMode mode, Channel channel)
bool isSequential () const override
size_t bytesPerFrame () const
Channel channel () const

Protected Member Functions

qint64 readData (char *, qint64) override
qint64 writeData (char const *, qint64) override
 Write data to the detector buffer.
Protected Member Functions inherited from AudioDevice
 AudioDevice (QObject *parent=nullptr)
void store (char const *source, size_t numFrames, qint16 *dest)
qint16 * load (qint16 const sample, qint16 *dest)

Additional Inherited Members

Public Types inherited from AudioDevice
enum  Channel { Mono , Left , Right , Both }
Static Public Member Functions inherited from AudioDevice
static char const * toString (Channel c)
static Channel fromString (QString const &str)

Constructor & Destructor Documentation

◆ Detector()

Detector::Detector ( unsigned frameRate,
unsigned periodLengthInSeconds,
QObject * parent = nullptr )

Construct a new Detector object.

Parameters
frameRate
periodLengthInSeconds
parent
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ reset()

bool Detector::reset ( )
override

Reset the detector state.

Returns
true
false
Here is the call graph for this function:

◆ secondInPeriod()

unsigned Detector::secondInPeriod ( ) const

Get the current second in the period.

Returns
unsigned
Here is the caller graph for this function:

◆ setBlockSize()

void Detector::setBlockSize ( unsigned n)

Set the block size for FFT processing.

Parameters
n
Here is the caller graph for this function:

◆ writeData()

qint64 Detector::writeData ( char const * data,
qint64 maxSize )
overrideprotected

Write data to the detector buffer.

Parameters
data
maxSize
Returns
qint64
Here is the call graph for this function:

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