CLAM-Development  1.4.0
Classes | Public Member Functions
CLAM::JACKNetworkPlayer Class Reference

#include <JACKNetworkPlayer.hxx>

List of all members.

Classes

struct  JackConnection
 Memento to restore jack connection status.

Public Member Functions

 JACKNetworkPlayer (const std::string &name="CLAM network player")
virtual ~JACKNetworkPlayer ()
void InitClient ()
bool IsWorking ()
 Should return true when the backend is able to run the network.
virtual bool IsRealTime () const
std::string NonWorkingReason ()
 Whenever the backend is not working, this method returns the reason.
void RegisterPorts ()
void RegisterInputPorts (const Network &net)
void RegisterOutputPorts (const Network &net)
void UnRegisterPorts ()
void OnShutdown ()
void CopyJackBuffersToSources (const jack_nframes_t nframes)
void CopySinksToJackBuffers (const jack_nframes_t nframes)
void BlankJackBuffers (const jack_nframes_t nframes)
virtual void Start ()
 Redefine to make the backend ready to process and start the network. If IsPlaying() should do nothing. If it IsPaused() you should consider just call BePlaying() without starting the processings.
virtual void Stop ()
 Redefine it to deactivate the backend.
virtual void Init ()
 Redefine to add any initialization after being attached to a network TODO: Consider removing it as just Jack backend uses it but it is redundant.
virtual unsigned BackendBufferSize ()
virtual unsigned BackendSampleRate ()
void Do (const jack_nframes_t nframes)
void StoreConnections ()
void RestoreConnections ()
void AutoConnectPorts ()
- Public Member Functions inherited from CLAM::NetworkPlayer
 NetworkPlayer ()
virtual ~NetworkPlayer ()
virtual void Pause ()
void SetNetworkBackLink (Network &net)
void BePaused ()
void BeStopped ()
void BePlaying ()
bool IsPaused () const
bool IsStopped () const
bool IsPlaying () const
std::string SourcesAndSinksToString ()

Additional Inherited Members

- Protected Types inherited from CLAM::NetworkPlayer
enum  Status { Playing = 0, Stopped = 1, Paused = 2 }
- Protected Member Functions inherited from CLAM::NetworkPlayer
NetworkGetNetwork ()
unsigned GetNSinks () const
unsigned GetNSources () const
void CacheSourcesAndSinks ()
const std::string & SourceName (unsigned source) const
const std::string & SinkName (unsigned sink) const
void SetSourceBuffer (unsigned source, const float *data, unsigned nframes)
void SetSinkBuffer (unsigned sink, float *data, unsigned nframes)
void SetSinkFrameSize (unsigned sink, unsigned frameSize)
void SetSourceFrameSize (unsigned source, unsigned frameSize)

Detailed Description

Definition at line 14 of file JACKNetworkPlayer.hxx.


Constructor & Destructor Documentation

CLAM::JACKNetworkPlayer::JACKNetworkPlayer ( const std::string &  name = "CLAM network player")

Definition at line 26 of file JACKNetworkPlayer.cxx.

References InitClient().

CLAM::JACKNetworkPlayer::~JACKNetworkPlayer ( )
virtual

Definition at line 35 of file JACKNetworkPlayer.cxx.

References Stop().


Member Function Documentation

void CLAM::JACKNetworkPlayer::AutoConnectPorts ( )

Definition at line 303 of file JACKNetworkPlayer.cxx.

References NULL.

Referenced by Start().

virtual unsigned CLAM::JACKNetworkPlayer::BackendBufferSize ( )
inlinevirtual

Reimplemented from CLAM::NetworkPlayer.

Definition at line 75 of file JACKNetworkPlayer.hxx.

virtual unsigned CLAM::JACKNetworkPlayer::BackendSampleRate ( )
inlinevirtual

Reimplemented from CLAM::NetworkPlayer.

Definition at line 80 of file JACKNetworkPlayer.hxx.

void CLAM::JACKNetworkPlayer::BlankJackBuffers ( const jack_nframes_t  nframes)

Definition at line 171 of file JACKNetworkPlayer.cxx.

Referenced by Do().

void CLAM::JACKNetworkPlayer::CopyJackBuffersToSources ( const jack_nframes_t  nframes)

Definition at line 151 of file JACKNetworkPlayer.cxx.

References CLAM::NetworkPlayer::SetSourceBuffer().

Referenced by Do().

void CLAM::JACKNetworkPlayer::CopySinksToJackBuffers ( const jack_nframes_t  nframes)

Definition at line 161 of file JACKNetworkPlayer.cxx.

References CLAM::NetworkPlayer::SetSinkBuffer().

Referenced by Do().

void CLAM::JACKNetworkPlayer::Do ( const jack_nframes_t  nframes)
void CLAM::JACKNetworkPlayer::Init ( )
virtual

Redefine to add any initialization after being attached to a network TODO: Consider removing it as just Jack backend uses it but it is redundant.

Reimplemented from CLAM::NetworkPlayer.

Definition at line 210 of file JACKNetworkPlayer.cxx.

References InitClient().

void CLAM::JACKNetworkPlayer::InitClient ( )
virtual bool CLAM::JACKNetworkPlayer::IsRealTime ( ) const
inlinevirtual

Implements CLAM::NetworkPlayer.

Definition at line 55 of file JACKNetworkPlayer.hxx.

bool CLAM::JACKNetworkPlayer::IsWorking ( )
virtual

Should return true when the backend is able to run the network.

Implements CLAM::NetworkPlayer.

Definition at line 48 of file JACKNetworkPlayer.cxx.

std::string CLAM::JACKNetworkPlayer::NonWorkingReason ( )
virtual

Whenever the backend is not working, this method returns the reason.

Implements CLAM::NetworkPlayer.

Definition at line 53 of file JACKNetworkPlayer.cxx.

void CLAM::JACKNetworkPlayer::OnShutdown ( )
void CLAM::JACKNetworkPlayer::RegisterInputPorts ( const Network net)
void CLAM::JACKNetworkPlayer::RegisterOutputPorts ( const Network net)
void CLAM::JACKNetworkPlayer::RegisterPorts ( )
void CLAM::JACKNetworkPlayer::RestoreConnections ( )

Definition at line 272 of file JACKNetworkPlayer.cxx.

Referenced by Start().

void CLAM::JACKNetworkPlayer::Start ( )
virtual

Redefine to make the backend ready to process and start the network. If IsPlaying() should do nothing. If it IsPaused() you should consider just call BePlaying() without starting the processings.

Implements CLAM::NetworkPlayer.

Definition at line 181 of file JACKNetworkPlayer.cxx.

References AutoConnectPorts(), CLAM::NetworkPlayer::BePlaying(), CLAM::NetworkPlayer::CacheSourcesAndSinks(), CLAM::NetworkPlayer::GetNetwork(), InitClient(), CLAM::NetworkPlayer::IsPaused(), CLAM::NetworkPlayer::IsPlaying(), RegisterPorts(), RestoreConnections(), CLAM::Network::Start(), and UnRegisterPorts().

void CLAM::JACKNetworkPlayer::Stop ( )
virtual
void CLAM::JACKNetworkPlayer::StoreConnections ( )

Definition at line 252 of file JACKNetworkPlayer.cxx.

Referenced by Stop().

void CLAM::JACKNetworkPlayer::UnRegisterPorts ( )

Definition at line 128 of file JACKNetworkPlayer.cxx.

Referenced by Start().


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