Ingen  0.5.1
Classes | Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
Ingen::Server::JackDriver Class Reference

The Jack Driver. More...

#include <JackDriver.hpp>

+ Inheritance diagram for Ingen::Server::JackDriver:
+ Collaboration diagram for Ingen::Server::JackDriver:

Classes

class  PortRegistrationFailedException
 

Public Member Functions

 JackDriver (Engine &engine)
 
bool attach (const std::string &server_name, const std::string &client_name, void *jack_client)
 
void activate ()
 Activate driver (begin processing graph and events). More...
 
void deactivate ()
 Deactivate driver (stop processing graph and events). More...
 
void enable ()
 
void disable ()
 
EnginePortcreate_port (DuplexPort *graph_port)
 Create a port ready to be inserted with add_input (non realtime). More...
 
EnginePortget_port (const Raul::Path &path)
 Find a system port by path. More...
 
void rename_port (const Raul::Path &old_path, const Raul::Path &new_path)
 Rename a system visible port. More...
 
void port_property (const Raul::Path &path, const Raul::URI &uri, const Atom &value)
 Apply a system visible port property. More...
 
void add_port (RunContext &context, EnginePort *port)
 Add a system visible port (e.g. More...
 
void remove_port (RunContext &context, EnginePort *port)
 Remove a system visible port. More...
 
void register_port (EnginePort &port)
 Register a system visible port. More...
 
void unregister_port (EnginePort &port)
 Register a system visible port. More...
 
const jack_position_t * position ()
 Transport state for this frame. More...
 
jack_transport_state_t transport_state ()
 
void append_time_events (RunContext &context, Buffer &buffer)
 Append time events for this cycle to buffer. More...
 
int real_time_priority ()
 Return the real-time priority of the audio thread, or -1. More...
 
jack_client_t * jack_client () const
 
SampleCount block_length () const
 Return the audio buffer size in frames.
 
size_t seq_size () const
 Return the event buffer size in bytes.
 
SampleCount sample_rate () const
 Return the sample rate in Hz.
 
SampleCount frame_time () const
 Return the current frame time (running counter)
 

Protected Types

typedef boost::intrusive::list< EnginePortPorts
 

Protected Attributes

Engine_engine
 
Ports _ports
 
LV2_Atom_Forge _forge
 
Raul::Semaphore _sem
 
std::atomic< bool > _flag
 
jack_client_t * _client
 
jack_nframes_t _block_length
 
size_t _seq_size
 
jack_nframes_t _sample_rate
 
uint32_t _midi_event_type
 
bool _is_activated
 
jack_position_t _position
 
jack_transport_state_t _transport_state
 
float _old_bpm
 
jack_nframes_t _old_frame
 
bool _old_rolling
 

Friends

class JackPort
 

Detailed Description

The Jack Driver.

The process callback here drives the entire audio thread by "pulling" events from queues, processing them, running the graphs, and passing events along to the PostProcessor.

Member Function Documentation

§ activate()

void Ingen::Server::JackDriver::activate ( )
virtual

Activate driver (begin processing graph and events).

Reimplemented from Ingen::Server::Driver.

§ deactivate()

void Ingen::Server::JackDriver::deactivate ( )
virtual

Deactivate driver (stop processing graph and events).

Reimplemented from Ingen::Server::Driver.

§ create_port()

EnginePort * Ingen::Server::JackDriver::create_port ( DuplexPort graph_port)
virtual

Create a port ready to be inserted with add_input (non realtime).

May return NULL if the Driver can not create the port for some reason.

Implements Ingen::Server::Driver.

References Ingen::Server::Buffer::append_event(), Ingen::Server::PortImpl::monitor(), Ingen::Server::DuplexPort::set_driver_buffer(), and Ingen::Server::DuplexPort::set_is_driver_port().

§ get_port()

EnginePort * Ingen::Server::JackDriver::get_port ( const Raul::Path &  path)
virtual

Find a system port by path.

Implements Ingen::Server::Driver.

§ rename_port()

void Ingen::Server::JackDriver::rename_port ( const Raul::Path &  old_path,
const Raul::Path &  new_path 
)
virtual

Rename a system visible port.

Implements Ingen::Server::Driver.

§ port_property()

void Ingen::Server::JackDriver::port_property ( const Raul::Path &  path,
const Raul::URI &  uri,
const Atom value 
)
virtual

Apply a system visible port property.

Implements Ingen::Server::Driver.

§ add_port()

void Ingen::Server::JackDriver::add_port ( RunContext context,
EnginePort port 
)
virtual

Add a system visible port (e.g.

a port on the root graph).

Implements Ingen::Server::Driver.

References Ingen::Server::DuplexPort::set_driver_buffer().

§ remove_port()

void Ingen::Server::JackDriver::remove_port ( RunContext context,
EnginePort port 
)
virtual

Remove a system visible port.

This removes the port from the driver in the process thread but does not destroy the port. To actually remove the system port, unregister_port() must be called later in another thread.

Implements Ingen::Server::Driver.

§ register_port()

void Ingen::Server::JackDriver::register_port ( EnginePort port)
virtual

Register a system visible port.

Implements Ingen::Server::Driver.

References Ingen::Resource::properties().

§ unregister_port()

void Ingen::Server::JackDriver::unregister_port ( EnginePort port)
virtual

Register a system visible port.

Implements Ingen::Server::Driver.

§ position()

const jack_position_t* Ingen::Server::JackDriver::position ( )
inline

Transport state for this frame.

Intended to only be called from the audio thread.

§ append_time_events()

void Ingen::Server::JackDriver::append_time_events ( RunContext context,
Buffer buffer 
)
virtual

Append time events for this cycle to buffer.

Implements Ingen::Server::Driver.

References Ingen::Server::Buffer::append_event().

§ real_time_priority()

int Ingen::Server::JackDriver::real_time_priority ( )
inlinevirtual

Return the real-time priority of the audio thread, or -1.

Implements Ingen::Server::Driver.


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