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

RtAudio::RtAudio ( int  outputDevice,
int  outputChannels,
int  inputDevice,
int  inputChannels,
RtAudioFormat  format,
int  sampleRate,
int *  bufferSize,
int  numberOfBuffers,
RtAudioApi  api = UNSPECIFIED 
)

A constructor which can be used to open a stream during instantiation.

The specified output and/or input device identifiers correspond to those enumerated via the getDeviceInfo() method. If device = 0, the default or first available devices meeting the given parameters is selected. If an output or input channel value is zero, the corresponding device value is ignored. When a stream is successfully opened, its identifier is returned via the "streamId" pointer. An RtError can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs.

See also:
openStream()

Definition at line 101 of file RtAudio.cpp.

{
  initialize( api );

  try {
    rtapi_->openStream( outputDevice, outputChannels,
                        inputDevice, inputChannels,
                        format, sampleRate,
                        bufferSize, numberOfBuffers );
  }
  catch (RtError &exception) {
    // Deallocate the RtApi instance.
    delete rtapi_;
    throw exception;
  }
}


Generated by  Doxygen 1.6.0   Back to index