Logo Search packages:      
Sourcecode: jacktrip version File versions  Download package

void JackTrip::setupRingBuffers (  ) [private]

Set the RingBuffer objects.

Todo:
Make all this operations cleaner

Definition at line 161 of file JackTrip.cpp.

References JackAudioInterface::getSizeInBytesPerChannel(), mBufferQueueLength, mJackAudio, mNumChans, mReceiveRingBuffer, mSendRingBuffer, mUnderRunMode, WAVETABLE, and ZEROS.

Referenced by start().

{
  // Create RingBuffers with the apprioprate size
  /// \todo Make all this operations cleaner
  switch (mUnderRunMode) {
  case WAVETABLE:
    mSendRingBuffer = new RingBufferWavetable(mJackAudio->getSizeInBytesPerChannel() * mNumChans,
                                    gDefaultOutputQueueLength);
    mReceiveRingBuffer = new RingBufferWavetable(mJackAudio->getSizeInBytesPerChannel() * mNumChans,
                                     mBufferQueueLength);
    
    break;
  case ZEROS:
    mSendRingBuffer = new RingBuffer(mJackAudio->getSizeInBytesPerChannel() * mNumChans,
                             gDefaultOutputQueueLength);
    mReceiveRingBuffer = new RingBuffer(mJackAudio->getSizeInBytesPerChannel() * mNumChans,
                              mBufferQueueLength);
    break;
  default:
    throw std::invalid_argument("Underrun Mode undefined");
    break;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index