CLAM-Development
1.4.0
|
#include <OfflineNetworkPlayer.hxx>
Public Types | |
typedef std::vector < SndfileHandle * > | SndFileHandles |
Public Member Functions | |
OfflineNetworkPlayer () | |
void | AddInputFile (const std::string &) |
void | AddOutputFile (const std::string &) |
void | AddNumChannels (int channel) |
void | SetFormat (int format) |
bool | IsWorking () |
Should return true when the backend is able to run the network. | |
std::string | NonWorkingReason () |
Whenever the backend is not working, this method returns the reason. | |
virtual bool | IsRealTime () const |
std::string | listOfSourcesSinksAndFiles (const SndFileHandles &infiles, const SndFileHandles &outfiles) |
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. | |
void | ProcessInputFile () |
void | EnableLoopInputWavs () |
void | SetResultWavsTime (double time) |
![]() | |
NetworkPlayer () | |
virtual | ~NetworkPlayer () |
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 void | Pause () |
void | SetNetworkBackLink (Network &net) |
void | BePaused () |
void | BeStopped () |
void | BePlaying () |
bool | IsPaused () const |
bool | IsStopped () const |
bool | IsPlaying () const |
virtual unsigned | BackendBufferSize () |
virtual unsigned | BackendSampleRate () |
std::string | SourcesAndSinksToString () |
Additional Inherited Members | |
![]() | |
enum | Status { Playing = 0, Stopped = 1, Paused = 2 } |
![]() | |
Network & | GetNetwork () |
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) |
Definition at line 13 of file OfflineNetworkPlayer.hxx.
typedef std::vector<SndfileHandle*> CLAM::OfflineNetworkPlayer::SndFileHandles |
Definition at line 42 of file OfflineNetworkPlayer.hxx.
|
inline |
Definition at line 27 of file OfflineNetworkPlayer.hxx.
void CLAM::OfflineNetworkPlayer::AddInputFile | ( | const std::string & | filename | ) |
Definition at line 264 of file OfflineNetworkPlayer.cxx.
void CLAM::OfflineNetworkPlayer::AddNumChannels | ( | int | channel | ) |
Definition at line 274 of file OfflineNetworkPlayer.cxx.
void CLAM::OfflineNetworkPlayer::AddOutputFile | ( | const std::string & | filename | ) |
Definition at line 269 of file OfflineNetworkPlayer.cxx.
|
inline |
Definition at line 52 of file OfflineNetworkPlayer.hxx.
|
inlinevirtual |
Implements CLAM::NetworkPlayer.
Definition at line 40 of file OfflineNetworkPlayer.hxx.
|
virtual |
Should return true when the backend is able to run the network.
Implements CLAM::NetworkPlayer.
Definition at line 14 of file OfflineNetworkPlayer.cxx.
References CLAM::NetworkPlayer::CacheSourcesAndSinks(), CLAM::NetworkPlayer::GetNSinks(), and CLAM::NetworkPlayer::GetNSources().
std::string CLAM::OfflineNetworkPlayer::listOfSourcesSinksAndFiles | ( | const SndFileHandles & | infiles, |
const SndFileHandles & | outfiles | ||
) |
Definition at line 32 of file OfflineNetworkPlayer.cxx.
References CLAM::NetworkPlayer::GetNSinks(), CLAM::NetworkPlayer::GetNSources(), CLAM::NetworkPlayer::SinkName(), and CLAM::NetworkPlayer::SourceName().
Referenced by Start().
|
virtual |
Whenever the backend is not working, this method returns the reason.
Implements CLAM::NetworkPlayer.
Definition at line 21 of file OfflineNetworkPlayer.cxx.
References CLAM::NetworkPlayer::GetNSinks(), and CLAM::NetworkPlayer::GetNSources().
void CLAM::OfflineNetworkPlayer::ProcessInputFile | ( | ) |
Definition at line 259 of file OfflineNetworkPlayer.cxx.
References CLAM::Network::Do(), and CLAM::NetworkPlayer::GetNetwork().
void CLAM::OfflineNetworkPlayer::SetFormat | ( | int | format | ) |
Definition at line 279 of file OfflineNetworkPlayer.cxx.
|
inline |
Definition at line 56 of file OfflineNetworkPlayer.hxx.
|
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 71 of file OfflineNetworkPlayer.cxx.
References CLAM::NetworkPlayer::BePlaying(), CLAM::NetworkPlayer::CacheSourcesAndSinks(), CLAM_ASSERT, CLAM::Network::Do(), CLAM::NetworkPlayer::GetNetwork(), CLAM::NetworkPlayer::GetNSinks(), CLAM::NetworkPlayer::GetNSources(), CLAM::NetworkPlayer::IsPlaying(), listOfSourcesSinksAndFiles(), CLAM::NetworkPlayer::SetSinkBuffer(), and CLAM::NetworkPlayer::SetSourceBuffer().
|
virtual |
Redefine it to deactivate the backend.
Implements CLAM::NetworkPlayer.
Definition at line 250 of file OfflineNetworkPlayer.cxx.
References CLAM::NetworkPlayer::BeStopped(), and CLAM::NetworkPlayer::IsStopped().