JS8Call-Improved master
Loading...
Searching...
No Matches
Modulator Class Referencefinal

#include <Modulator.h>

Inheritance diagram for Modulator:
Collaboration diagram for Modulator:

Public Types

enum class  State { Synchronizing , Active , Idle }
Public Types inherited from AudioDevice
enum  Channel { Mono , Left , Right , Both }

Public Member Functions

 Modulator (QObject *parent=nullptr)
bool isIdle () const
void close () override
 Close the modulator.
Q_SLOT void setAudioFrequency (double const audioFrequency)
Q_SLOT void start (double audioFrequency, int submode, double tx_delay, SoundOutput *stream, Channel channel)
 Start the modulation process.
Q_SLOT void stop (bool quick=false)
 Stop the modulation process.
Q_SLOT void tune (bool state=true)
 Set tuning mode.
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
 Read data from the modulator.
qint64 writeData (char const *, qint64) override
qint64 bytesAvailable () const override
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

Static Public Member Functions inherited from AudioDevice
static char const * toString (Channel c)
static Channel fromString (QString const &str)

Detailed Description

Audio device that generates PCM audio frames that encode a message.

Output can be muted while underway, preserving waveform timing when transmission is resumed.

This is intended to run in a thread different from the GUI thread. It is not generally thread-safe, see remarks below.

Member Function Documentation

◆ isIdle()

bool Modulator::isIdle ( ) const
inline

Whether the device is idle.

This method is thread-safe, i.e., can be called from a different thread.

Here is the caller graph for this function:

◆ readData()

qint64 Modulator::readData ( char * data,
qint64 maxSize )
overrideprotected

Read data from the modulator.

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

◆ setAudioFrequency()

Q_SLOT void Modulator::setAudioFrequency ( double const audioFrequency)
inline

Sets the audio frequency.

This is not by itself thread-safe, but ok if fed via the Qt signalling mechanism.

Here is the caller graph for this function:

◆ start()

void Modulator::start ( double audioFrequency,
int submode,
double tx_delay,
SoundOutput * stream,
Channel channel )

Start the modulation process.

Parameters
frequency
submode
txDelay
stream
channel
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void Modulator::stop ( bool quick = false)

Stop the modulation process.

Parameters
quickClose
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tune()

void Modulator::tune ( bool state = true)

Set tuning mode.

Parameters
tuning
Here is the call graph for this function:
Here is the caller graph for this function:

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