gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
#include <CrossoverAudio.H>
Public Member Functions | |
CrossoverAudio () | |
Constructor : starts connecting to Jack audio. More... | |
virtual | ~CrossoverAudio () |
Destructor. More... | |
void | setGain (float g) |
float | getGain (void) |
int | setDuration (float d) |
float | getDuration (void) |
int | setChannels (int outCnt, int inCnt, int testInCnt) |
void | getChannels (int &inCnt, int &outCnt) |
int | recordNextChannelSet () |
void | nextCrossover () |
virtual int | reset () |
virtual int | getNumberOfRecordedChannels () |
int | isRecording () |
Public Member Functions inherited from JackClient | |
JackClient (void) | |
JackClient (string clientName_) | |
virtual | ~JackClient () |
Destructor. More... | |
virtual int | connect (string clientName_) |
virtual int | connect (const string &clientName_, const string &serverName) |
virtual int | getBlockSize () |
int | setBlockSize (int size) |
virtual int | startClient () |
Public Member Functions inherited from JackBase | |
JackBase () | |
JackBase (string clientName_) | |
JackBase (string clientName_, string serverName) | |
virtual | ~JackBase () |
Destructor. More... | |
virtual int | stopClient (void) |
virtual int | disconnect (void) |
int | getSampleRate (void) const |
virtual int | createPorts (string inName, int inCnt, string outName, int outCnt) |
virtual int | destroyPorts () |
void | getPhysicalPorts (vector< jack_port_t *> &inPorts, vector< jack_port_t *> &outPorts) |
void | getPhysicalPortCount (int &in, int &out) |
bool | connected () |
virtual void | print (ostream &os) |
string | getClientName () |
virtual void | setClientName (string cn) |
string | portNameFromPort (jack_port_id_t p) |
string | portNameFromPort (jack_port_t *p) |
string | clientNameFromPort (jack_port_id_t p) |
string | clientNameFromPort (jack_port_t *p) |
string | clientNameFromPortName (string fullPortName) |
string | clientNameFromPortNames (string fullPortName, string shortPortName) |
string | shortPortNameFromPortName (const string fullPortName) |
bool | operator== (const string &cn) |
int | getInputPortSize () |
jack_port_t * | getInputPort (int i) |
jack_port_t * | getOutputPort (int i) |
void | addInputPort (jack_port_t *inP) |
void | addOutputPort (jack_port_t *outP) |
int | populatInOutPorts (const string &inName, vector< string > &inPorts, const string &outName, vector< string > &outPorts) |
int | connectPorts (const string inName, const string outName) |
virtual int | disconnectPorts (const string &inName, const string &outName) |
void | setClient (jack_client_t *c) |
Public Attributes | |
Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > | audio |
The first channel is the same data sent over each output channel, then the output channels, then the input channels. More... | |
Public Attributes inherited from JackBase | |
bool | connect1To1 |
When true, then connections are made in a 1 to 1 manner. When False, then connections are made in an all to all manner. More... | |
Protected Attributes | |
float | gain |
The gain for the output. More... | |
Mutex | recordLock |
The lock for when the audio is being played/recorded. More... | |
unsigned int | zeroSampleCnt |
The number of samples to train with zeros. More... | |
int | samplesToProcess |
The number of samples to process, matching the duration. More... | |
int | samplesProcessed |
The number of samples already processed. More... | |
int | currentInputChannel |
The current input channel to test. More... | |
Protected Attributes inherited from JackBase | |
jack_client_t * | client |
The jack client. More... | |
string | clientName |
The name of this client. More... | |
jack_options_t | jackOptions |
Options for jack. More... | |
jack_status_t | status |
The status of jack. More... | |
int | physicalInputPortCnt |
The number of physical input ports. More... | |
int | physicalOutputPortCnt |
The number of physical input ports. More... | |
vector< jack_port_t * > | inputPorts |
The input ports. More... | |
vector< jack_port_t * > | outputPorts |
The output ports. More... | |
vector< jack_nframes_t > | inputLatencies |
The input latencies, one for each port. More... | |
vector< jack_nframes_t > | outputLatencies |
The output latencies, one for each port. More... | |
Private Member Functions | |
virtual int | processAudio (jack_nframes_t nframes) |
The Jack client callback. More... | |
virtual int | startClient (int inCnt, int outCnt, bool doConnect) |
Additional Inherited Members | |
Protected Member Functions inherited from JackClient | |
virtual int | bufferSizeChange (jack_nframes_t nframes) |
Protected Member Functions inherited from JackBase | |
virtual void | determineLatencies () |
int | getPortListAndCount (JackPortFlags flags, vector< jack_port_t *> *ports, const char *portNamePattern, const char *typeNamePattern) |
int | getPortListAndCount (JackPortFlags flags, vector< string > *ports, const char *portNamePattern, const char *typeNamePattern) |
virtual void | reSyncPorts (void) |
virtual void | reSyncConnections (void) |
Class to play and record audio data for analysis. Usefull for measuing frequency responses. In general, there is only one vector of output test data, it is played on all operating output channels.
Definition at line 35 of file CrossoverAudio.H.
CrossoverAudio::CrossoverAudio | ( | ) |
Constructor : starts connecting to Jack audio.
Definition at line 20 of file CrossoverAudio.C.
|
virtual |
Destructor.
Definition at line 28 of file CrossoverAudio.C.
void CrossoverAudio::getChannels | ( | int & | inCnt, |
int & | outCnt | ||
) |
Get the number of input and output channels
[out] | inCnt | The number of input channels. |
[out] | outCnt | The number of output channels. |
Definition at line 101 of file CrossoverAudio.C.
|
inline |
Get the duration for the output data.
Definition at line 86 of file CrossoverAudio.H.
|
inline |
Get the gain for the output data.
Definition at line 73 of file CrossoverAudio.H.
|
inlinevirtual |
Get number of recorded channels.
Reimplemented in MixerTestAudio.
Definition at line 121 of file CrossoverAudio.H.
int CrossoverAudio::isRecording | ( | ) |
Test if the recording thread is operational (could also possibly return locked when a 'setter' method is operating.)
Definition at line 120 of file CrossoverAudio.C.
void CrossoverAudio::nextCrossover | ( | ) |
Reset to test another crossover without re-recording the channel.
Definition at line 115 of file CrossoverAudio.C.
|
privatevirtual |
The Jack client callback.
Implements JackClient.
Reimplemented in MixerTestAudio.
Definition at line 31 of file CrossoverAudio.C.
int CrossoverAudio::recordNextChannelSet | ( | ) |
Record the next set of channels.
Definition at line 106 of file CrossoverAudio.C.
|
virtual |
Reset the system, initialise ports and the output/input sample data;
Reimplemented in MixerTestAudio.
Definition at line 65 of file CrossoverAudio.C.
int CrossoverAudio::setChannels | ( | int | outCnt, |
int | inCnt, | ||
int | testInCnt | ||
) |
Set the channel counts.
inCnt | The number of input channels. |
outCnt | The number of output channels. |
testInCnt | The total number of channels to record for the entire test |
Definition at line 89 of file CrossoverAudio.C.
int CrossoverAudio::setDuration | ( | float | d | ) |
Set the duration to sample for.
d | The duration in seconds |
Definition at line 80 of file CrossoverAudio.C.
|
inline |
Set the gain for the output data.
g | The gain to set. |
Definition at line 66 of file CrossoverAudio.H.
|
privatevirtual |
Start the client running. If the doConnect is true, then an attempt is made to auto connect the ports to the system ports. If auto connection fails, the client is still running.
inCnt | The number of input ports to connect to |
outCnt | The number of output ports to connect to |
doConnect | Auto-connect inputs and outputs to the system ports. |
Reimplemented from JackClient.
Definition at line 60 of file CrossoverAudio.C.
Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic> CrossoverAudio::audio |
The first channel is the same data sent over each output channel, then the output channels, then the input channels.
Definition at line 58 of file CrossoverAudio.H.
|
protected |
The current input channel to test.
Definition at line 56 of file CrossoverAudio.H.
|
protected |
The gain for the output.
Definition at line 49 of file CrossoverAudio.H.
|
protected |
The lock for when the audio is being played/recorded.
Definition at line 50 of file CrossoverAudio.H.
|
protected |
The number of samples already processed.
Definition at line 55 of file CrossoverAudio.H.
|
protected |
The number of samples to process, matching the duration.
Definition at line 54 of file CrossoverAudio.H.
|
protected |
The number of samples to train with zeros.
Definition at line 51 of file CrossoverAudio.H.
GTK+ IOStream
Beta
|