LMMS
Loading...
Searching...
No Matches
AlsaEngine Class Reference

#include <AlsaEngine.h>

Inheritance diagram for AlsaEngine:
AudioOut MidiIn Engine

Public Member Functions

 AlsaEngine ()
 ~AlsaEngine ()
bool Start ()
void Stop ()
void setAudioEn (bool nval)
bool getAudioEn () const
void setMidiEn (bool nval)
bool getMidiEn () const
Public Member Functions inherited from AudioOut
 AudioOut ()
virtual ~AudioOut ()
void setSamplerate (int _samplerate)
int getSampleRate ()
void setBufferSize (int _bufferSize)
void bufferingSize (int nBuffering)
int bufferingSize ()
Public Member Functions inherited from Engine
 Engine ()
virtual ~Engine ()

Protected Member Functions

voidAudioThread ()
voidMidiThread ()
Protected Member Functions inherited from AudioOut
const Stereo< float * > getNext ()

Static Protected Member Functions

static void_AudioThread (void *arg)
static void_MidiThread (void *arg)

Private Member Functions

bool openMidi ()
void stopMidi ()
bool openAudio ()
void stopAudio ()
short * interleave (const Stereo< float * > &smps)
voidprocessAudio ()
Private Member Functions inherited from Engine
 Engine ()
virtual ~Engine ()

Private Attributes

struct { 
   std::string   device 
   snd_seq_t *   handle 
   int   alsaId 
   pthread_t   pThread 
midi
struct { 
   snd_pcm_t *   handle 
   snd_pcm_hw_params_t *   params 
   unsigned int   sampleRate 
   snd_pcm_uframes_t   frames 
   unsigned int   periods 
   short *   buffer 
   pthread_t   pThread 
audio
Private Attributes inherited from Engine
std::string name

Additional Inherited Members

Public Attributes inherited from Engine
std::string name
Protected Attributes inherited from AudioOut
int samplerate
int bufferSize
Static Private Member Functions inherited from MidiIn
static void midiProcess (unsigned char head, unsigned char num, unsigned char value)

Constructor & Destructor Documentation

◆ AlsaEngine()

AlsaEngine::AlsaEngine ( )

◆ ~AlsaEngine()

AlsaEngine::~AlsaEngine ( )

Member Function Documentation

◆ _AudioThread()

void * AlsaEngine::_AudioThread ( void * arg)
staticprotected

◆ _MidiThread()

void * AlsaEngine::_MidiThread ( void * arg)
staticprotected

◆ AudioThread()

void * AlsaEngine::AudioThread ( )
protected

◆ getAudioEn()

bool AlsaEngine::getAudioEn ( ) const
virtual

Implements AudioOut.

◆ getMidiEn()

bool AlsaEngine::getMidiEn ( ) const
virtual

Returns if driver is initialized

Implements MidiIn.

◆ interleave()

short * AlsaEngine::interleave ( const Stereo< float * > & smps)
private
Todo
TODO fix repeated allocation

◆ MidiThread()

void * AlsaEngine::MidiThread ( void )
protected

◆ openAudio()

bool AlsaEngine::openAudio ( )
private

◆ openMidi()

bool AlsaEngine::openMidi ( )
private

◆ processAudio()

void * AlsaEngine::processAudio ( )
private

◆ setAudioEn()

void AlsaEngine::setAudioEn ( bool nval)
virtual

Implements AudioOut.

◆ setMidiEn()

void AlsaEngine::setMidiEn ( bool nval)
virtual

Enables or disables driver based upon value

Implements MidiIn.

◆ Start()

bool AlsaEngine::Start ( )
virtual

Start the Driver with all capabilities

Returns
true on success

Implements Engine.

◆ Stop()

void AlsaEngine::Stop ( )
virtual

Completely stop the Driver

Implements Engine.

◆ stopAudio()

void AlsaEngine::stopAudio ( )
private

◆ stopMidi()

void AlsaEngine::stopMidi ( )
private

Member Data Documentation

◆ alsaId

int AlsaEngine::alsaId

◆ [struct]

struct { ... } AlsaEngine::audio

◆ buffer

short* AlsaEngine::buffer

◆ device

std::string AlsaEngine::device

◆ frames

snd_pcm_uframes_t AlsaEngine::frames

◆ handle [1/2]

snd_pcm_t* AlsaEngine::handle

◆ handle [2/2]

snd_seq_t* AlsaEngine::handle

◆ [struct]

struct { ... } AlsaEngine::midi

◆ params

snd_pcm_hw_params_t* AlsaEngine::params

◆ periods

unsigned int AlsaEngine::periods

◆ pThread

pthread_t AlsaEngine::pThread

◆ sampleRate

unsigned int AlsaEngine::sampleRate

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