LogoSearch packages:      

Sourcecode: audacity version File versions

AudioIO Class Reference

List of all members.


Detailed Description

AudioIO uses the PortAudio library to play and record sound.

Great care and attention to detail are necessary for understanding and modifying this system. The code in this file is run from three different thread contexts: the UI thread, the disk thread (which this file creates and maintains) and the PortAudio callback thread. To highlight this deliniation, the file is divided into three parts based on what thread context each function is intended to run in.

Todo:
run through all functions called from audio and portaudio threads to verify they are thread-safe.

Definition at line 55 of file AudioIO.h.


Public Member Functions

sampleFormat GetCaptureFormat ()
wxArrayString GetInputSourceNames ()
void GetMixer (int *inputSource, float *inputVolume, float *playbackVolume)
int GetNumCaptureChannels ()
double GetStreamTime ()
void HandleDeviceChange ()
bool IsAudioTokenActive (int token)
bool IsBusy ()
bool IsMonitoring ()
bool IsPaused ()
bool IsStreamActive (int token)
bool IsStreamActive ()
void SeekStream (double seconds)
void SetMeters (Meter *inputMeter, Meter *outputMeter)
void SetMixer (int inputSource, float inputVolume, float playbackVolume)
void SetPaused (bool state)
void StartMonitoring (double sampleRate)
int StartStream (WaveTrackArray playbackTracks, WaveTrackArray captureTracks, TimeTrack *timeTrack, double sampleRate, double t0, double t1, AudioIOListener *listener, bool playLooped=false, double cutPreviewGapStart=0.0, double cutPreviewGapLen=0.0)
void StopStream ()

Static Public Member Functions

static int GetOptimalSupportedSampleRate ()
static wxArrayLong GetSupportedCaptureRates (wxString devName=wxT(""), double rate=0.0)
static wxArrayLong GetSupportedPlaybackRates (wxString devName=wxT(""), double rate=0.0)
static wxArrayLong GetSupportedSampleRates (wxString playDevice=wxT(""), wxString recDevice=wxT(""), double rate=0.0)

Static Public Attributes

static const int NumStandardRates
static const int StandardRates []

Private Member Functions

void FillBuffers ()
long GetBestRate (bool capturing, double sampleRate)
int GetCommonlyAvailCapture ()
int GetCommonlyAvailPlayback ()
double NormalizeStreamTime (double absoluteTime) const
bool StartPortAudioStream (double sampleRate, unsigned int numPlaybackChannels, unsigned int numCaptureChannels, sampleFormat captureFormat)

Private Attributes

volatile bool mAudioThreadFillBuffersLoopActive
volatile bool mAudioThreadFillBuffersLoopRunning
volatile bool mAudioThreadShouldCallFillBuffersOnce
RingBuffer ** mCaptureBuffers
sampleFormat mCaptureFormat
double mCaptureRingBufferSecs
WaveTrackArray mCaptureTracks
double mCutPreviewGapLen
double mCutPreviewGapStart
bool mEmulateMixerInputVol
bool mEmulateMixerOutputVol
double mFactor
volatile bool mInCallbackFinishedState
MetermInputMeter
PaError mLastPaError
volatile double mLastRecordingOffset
AudioIOListener * mListener
int mLostSamples
double mMaxPlaybackSecsToCopy
double mMinCaptureSecsToCopy
float mMixerInputVol
float mMixerOutputVol
unsigned int mNumCaptureChannels
unsigned int mNumPlaybackChannels
MetermOutputMeter
bool mPaused
RingBuffer ** mPlaybackBuffers
Mixer ** mPlaybackMixers
double mPlaybackRingBufferSecs
WaveTrackArray mPlaybackTracks
bool mPlayLooped
double mPlaySpeed
PortAudioStream * mPortStreamV18
double mRate
Resample ** mResample
double mSeek
bool mSoftwarePlaythrough
int mStopStreamCount
int mStreamToken
double mT
double mT0
double mT1
float * mTempFloats
AudioThreadmThread
double mTime
bool mUpdateMeters
bool mUpdatingMeters
double mWarpedT1

Static Private Attributes

static int mNextStreamToken = 0

Friends

int audacityAudioCallback (void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, PaTimestamp outTime, void *userData)
class AudioThread
void DeinitAudioIO ()
void InitAudioIO ()

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

Generated by  Doxygen 1.5.1   Back to index