Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PCMWriterInterface Class Referenceabstract

Abstract base class for sound-producing software components which transmit data to the AudioPlayerAdapter. More...

#include <pcmwriterinterface.h>

+ Inheritance diagram for PCMWriterInterface:

Public Member Functions

virtual void init (const int sampleRate, const int channels)
 Initialize the PCM-Writer with given sample rate and channel number. More...
 
virtual void exit ()=0
 Exit, shut down writer interface. More...
 
virtual bool generateAudioSignal (AudioBase::PacketType &outputPacket)=0
 Function that generates new sound and copies it to the outputPacket. More...
 

Protected Attributes

int mSampleRate = 0
 Sample rate. More...
 
int mChannels = 0
 Number of channels. More...
 

Detailed Description

Abstract base class for sound-producing software components which transmit data to the AudioPlayerAdapter.

This class is the base class for any derived class that produces sound and sends it to the audio device. In the EPT the Synthesizer is the only class that produces sound. This is a header file only without implementation (cpp) file.

See also
AudioPlayerAdapter
AudioPlayerForQt

Definition at line 37 of file pcmwriterinterface.h.

Member Function Documentation

virtual void PCMWriterInterface::exit ( )
pure virtual

Exit, shut down writer interface.

Implemented in Synthesizer.

virtual bool PCMWriterInterface::generateAudioSignal ( AudioBase::PacketType outputPacket)
pure virtual

Function that generates new sound and copies it to the outputPacket.

This function is called by the implementation of the AudioPlayer as a request to generate new sound and to copy it to the outputPacket passed by reference.

Parameters
outputPacketThe output packet (newly generated sound) to be filled. The length of the packet can be chosen freely.
Returns
True on success, false if the player should pause.

Implemented in Synthesizer.

virtual void PCMWriterInterface::init ( const int  sampleRate,
const int  channels 
)
inlinevirtual

Initialize the PCM-Writer with given sample rate and channel number.

Parameters
sampleRate: The sample rate
channels: The number of channels

Reimplemented in Synthesizer.

Definition at line 46 of file pcmwriterinterface.h.

Member Data Documentation

int PCMWriterInterface::mChannels = 0
protected

Number of channels.

Definition at line 66 of file pcmwriterinterface.h.

int PCMWriterInterface::mSampleRate = 0
protected

Sample rate.

Definition at line 65 of file pcmwriterinterface.h.


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