Audacity 3.2.0
|
#include "AudioIOBase.h"
#include "AudioIOSequences.h"
#include "PlaybackSchedule.h"
#include <functional>
#include <memory>
#include <mutex>
#include <thread>
#include <utility>
#include <wx/atomic.h>
#include <wx/thread.h>
#include "PluginProvider.h"
#include "Observer.h"
#include "SampleCount.h"
#include "SampleFormat.h"
Go to the source code of this file.
Classes | |
struct | AudioIOEvent |
struct | TransportSequences |
class | AudioIoCallback |
AudioIoCallback is a class that implements the callback required by PortAudio. The callback needs to be responsive, has no GUI, and copies data into and out of the sound card buffers. It also sends data to the meters. More... | |
class | AudioIoCallback::AudioIOExtIterator |
struct | AudioIoCallback::AudioIOExtRange |
class | AudioIO |
AudioIO uses the PortAudio library to play and record sound. More... | |
Namespaces | |
namespace | RealtimeEffects |
Typedefs | |
typedef unsigned long | PaStreamCallbackFlags |
typedef int | PaError |
Enumerations | |
enum class | Acknowledge { eNone = 0 , eStart , eStop } |
Functions | |
bool | ValidateDeviceNames () |
int | audacityAudioCallback (const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData) |
Variables | |
AUDIO_IO_API BoolSetting | SoundActivatedRecord |
typedef unsigned long PaStreamCallbackFlags |
|
strong |
int audacityAudioCallback | ( | const void * | inputBuffer, |
void * | outputBuffer, | ||
unsigned long | framesPerBuffer, | ||
const PaStreamCallbackTimeInfo * | timeInfo, | ||
PaStreamCallbackFlags | statusFlags, | ||
void * | userData | ||
) |
brief The function which is called from PortAudio's callback thread context to collect and deliver audio for / from the sound device.
This covers recording, playback, and doing both simultaneously. It is also invoked to do monitoring and software playthrough. Note that dealing with the two buffers needs some care to ensure that the right things happen for all possible cases.
inputBuffer | Buffer of length framesPerBuffer containing samples from the sound card, or null if not capturing audio. Note that the data type will depend on the format of audio data that was chosen when the stream was created (so could be floats or various integers) |
outputBuffer | Uninitialised buffer of length framesPerBuffer which will be sent to the sound card after the callback, or null if not playing audio back. |
framesPerBuffer | The length of the playback and recording buffers |
PaStreamCallbackTimeInfo | Pointer to PortAudio time information structure, which tells us how long we have been playing / recording |
statusFlags | PortAudio stream status flags |
userData | pointer to user-defined data structure. Provided for flexibility by PortAudio, but not used by Audacity - the data is stored in the AudioIO class instead. |
Definition at line 2617 of file AudioIO.cpp.
References AudioIO::Get().
Referenced by AudioIO::StartPortAudioStream().
bool ValidateDeviceNames | ( | ) |
|
extern |
Definition at line 3370 of file AudioIO.cpp.
Referenced by RecordingPrefs::Commit(), anonymous_namespace{PluginMenus.cpp}::OnResetConfig(), anonymous_namespace{TransportMenus.cpp}::OnToggleSoundActivated(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), AudioIO::StartStream(), and anonymous_namespace{TransportMenus.cpp}::TransportMenu().