CLAM-Development
1.1
|
A NetworkPlayer is an object that controls the playback of a Network providing a high level transport like interface. More...
#include <NetworkPlayer.hxx>
Public Member Functions | |
NetworkPlayer () | |
virtual | ~NetworkPlayer () |
virtual bool | IsWorking () const =0 |
Should return true when the backend is able to run the network. | |
virtual std::string | NonWorkingReason () const =0 |
Whenever the backend is not working, this method returns the reason. | |
virtual void | Start ()=0 |
virtual void | Stop ()=0 |
virtual void | Init () |
void | SetNetworkBackLink (Network &net) |
bool | IsStopped () |
virtual unsigned | BackendBufferSize () |
virtual unsigned | BackendSampleRate () |
std::string | SourcesAndSinksToString () |
Protected Types | |
typedef std::vector < AudioSource * > | AudioSources |
typedef std::vector< AudioSink * > | AudioSinks |
Protected Member Functions | |
Network & | GetNetwork () |
void | SetStopped (const bool val) |
void | CollectSourcesAndSinks () |
const AudioSources & | GetAudioSources () const |
const AudioSinks & | GetAudioSinks () const |
AudioSources & | GetAudioSources () |
AudioSinks & | GetAudioSinks () |
Protected Attributes | |
AudioSources | _sources |
AudioSinks | _sinks |
A NetworkPlayer is an object that controls the playback of a Network providing a high level transport like interface.
This class is an abstract class. Subclasses contextualizes the network inside a given execution context dealing with threading, callback calling and device mapping on concrete architectures such as Alsa, PortAudio, Jack, VST, Ladspa...
Definition at line 39 of file NetworkPlayer.hxx.
typedef std::vector<AudioSink*> CLAM::NetworkPlayer::AudioSinks [protected] |
Definition at line 43 of file NetworkPlayer.hxx.
typedef std::vector<AudioSource*> CLAM::NetworkPlayer::AudioSources [protected] |
Definition at line 42 of file NetworkPlayer.hxx.
CLAM::NetworkPlayer::NetworkPlayer | ( | ) | [inline] |
Definition at line 45 of file NetworkPlayer.hxx.
References NULL, and SetStopped().
virtual CLAM::NetworkPlayer::~NetworkPlayer | ( | ) | [inline, virtual] |
Definition at line 51 of file NetworkPlayer.hxx.
virtual unsigned CLAM::NetworkPlayer::BackendBufferSize | ( | ) | [inline, virtual] |
Reimplemented in CLAM::JACKNetworkPlayer.
Definition at line 73 of file NetworkPlayer.hxx.
Referenced by CLAM::FlattenedNetwork::BackendBufferSize().
virtual unsigned CLAM::NetworkPlayer::BackendSampleRate | ( | ) | [inline, virtual] |
Reimplemented in CLAM::JACKNetworkPlayer.
Definition at line 78 of file NetworkPlayer.hxx.
Referenced by CLAM::FlattenedNetwork::BackendSampleRate().
void CLAM::NetworkPlayer::CollectSourcesAndSinks | ( | ) | [protected] |
Definition at line 27 of file NetworkPlayer.cxx.
References _sinks, _sources, CLAM::FlattenedNetwork::BeginProcessings(), CLAM::FlattenedNetwork::EndProcessings(), and GetNetwork().
Referenced by CLAM::FreewheelingNetworkPlayer::Start(), and CLAM::PANetworkPlayer::Start().
const AudioSinks& CLAM::NetworkPlayer::GetAudioSinks | ( | ) | const [inline, protected] |
Definition at line 93 of file NetworkPlayer.hxx.
References _sinks.
Referenced by CLAM::FreewheelingNetworkPlayer::IsWorking(), CLAM::FreewheelingNetworkPlayer::NonWorkingReason(), and CLAM::FreewheelingNetworkPlayer::Start().
AudioSinks& CLAM::NetworkPlayer::GetAudioSinks | ( | ) | [inline, protected] |
Definition at line 95 of file NetworkPlayer.hxx.
References _sinks.
const AudioSources& CLAM::NetworkPlayer::GetAudioSources | ( | ) | const [inline, protected] |
Definition at line 92 of file NetworkPlayer.hxx.
References _sources.
Referenced by CLAM::FreewheelingNetworkPlayer::IsWorking(), CLAM::FreewheelingNetworkPlayer::NonWorkingReason(), and CLAM::FreewheelingNetworkPlayer::Start().
AudioSources& CLAM::NetworkPlayer::GetAudioSources | ( | ) | [inline, protected] |
Definition at line 94 of file NetworkPlayer.hxx.
References _sources.
Network& CLAM::NetworkPlayer::GetNetwork | ( | ) | [inline, protected] |
Definition at line 85 of file NetworkPlayer.hxx.
References CLAM_ASSERT, and NULL.
Referenced by CollectSourcesAndSinks(), CLAM::JACKNetworkPlayer::Do(), CLAM::JACKNetworkPlayer::OnShutdown(), CLAM::FreewheelingNetworkPlayer::ProcessInputFile(), CLAM::JACKNetworkPlayer::RegisterPorts(), SourcesAndSinksToString(), and CLAM::FreewheelingNetworkPlayer::Start().
virtual void CLAM::NetworkPlayer::Init | ( | ) | [inline, virtual] |
Reimplemented in CLAM::JACKNetworkPlayer.
Definition at line 61 of file NetworkPlayer.hxx.
Referenced by CLAM::FlattenedNetwork::SetPlayer().
bool CLAM::NetworkPlayer::IsStopped | ( | ) | [inline] |
Definition at line 69 of file NetworkPlayer.hxx.
Referenced by CLAM::JACKNetworkPlayer::Do(), CLAM::FlattenedNetwork::IsStopped(), CLAM::FreewheelingNetworkPlayer::Start(), CLAM::PANetworkPlayer::Start(), CLAM::JACKNetworkPlayer::Start(), CLAM::FreewheelingNetworkPlayer::Stop(), CLAM::PANetworkPlayer::Stop(), and CLAM::JACKNetworkPlayer::Stop().
virtual bool CLAM::NetworkPlayer::IsWorking | ( | ) | const [pure virtual] |
Should return true when the backend is able to run the network.
Implemented in CLAM::JACKNetworkPlayer, CLAM::PANetworkPlayer, and CLAM::FreewheelingNetworkPlayer.
virtual std::string CLAM::NetworkPlayer::NonWorkingReason | ( | ) | const [pure virtual] |
Whenever the backend is not working, this method returns the reason.
Implemented in CLAM::JACKNetworkPlayer, CLAM::PANetworkPlayer, and CLAM::FreewheelingNetworkPlayer.
void CLAM::NetworkPlayer::SetNetworkBackLink | ( | Network & | net | ) | [inline] |
Definition at line 65 of file NetworkPlayer.hxx.
Referenced by CLAM::FlattenedNetwork::SetPlayer().
void CLAM::NetworkPlayer::SetStopped | ( | const bool | val | ) | [inline, protected] |
Definition at line 90 of file NetworkPlayer.hxx.
Referenced by NetworkPlayer(), CLAM::JACKNetworkPlayer::OnShutdown(), CLAM::FreewheelingNetworkPlayer::Start(), CLAM::PANetworkPlayer::Start(), CLAM::JACKNetworkPlayer::Start(), CLAM::FreewheelingNetworkPlayer::Stop(), CLAM::PANetworkPlayer::Stop(), and CLAM::JACKNetworkPlayer::Stop().
std::string CLAM::NetworkPlayer::SourcesAndSinksToString | ( | ) |
Definition at line 41 of file NetworkPlayer.cxx.
References CLAM::FlattenedNetwork::BeginProcessings(), CLAM::FlattenedNetwork::EndProcessings(), and GetNetwork().
virtual void CLAM::NetworkPlayer::Start | ( | ) | [pure virtual] |
Implemented in CLAM::JACKNetworkPlayer, CLAM::PANetworkPlayer, and CLAM::FreewheelingNetworkPlayer.
Referenced by CLAM::FlattenedNetwork::Start().
virtual void CLAM::NetworkPlayer::Stop | ( | ) | [pure virtual] |
Implemented in CLAM::JACKNetworkPlayer, CLAM::PANetworkPlayer, and CLAM::FreewheelingNetworkPlayer.
Referenced by CLAM::FlattenedNetwork::Stop().
AudioSinks CLAM::NetworkPlayer::_sinks [protected] |
Definition at line 98 of file NetworkPlayer.hxx.
Referenced by CollectSourcesAndSinks(), GetAudioSinks(), and CLAM::PANetworkPlayer::Start().
AudioSources CLAM::NetworkPlayer::_sources [protected] |
Definition at line 97 of file NetworkPlayer.hxx.
Referenced by CollectSourcesAndSinks(), GetAudioSources(), and CLAM::PANetworkPlayer::Start().