Skip to content

Commit

Permalink
SoundManager formatting misc.
Browse files Browse the repository at this point in the history
  • Loading branch information
rryan committed Jan 14, 2014
1 parent 491b7bc commit 7905a7e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/sounddeviceportaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class SoundDevicePortAudio : public SoundDevice {
int open();
int close();
QString getError() const;

// This callback function gets called everytime the sound device runs out of
// samples (ie. when it needs more sound to play)
int callbackProcess(unsigned long framesPerBuffer,
float *output, float* in,
const PaStreamCallbackTimeInfo *timeInfo,
Expand Down Expand Up @@ -70,6 +73,8 @@ class SoundDevicePortAudio : public SoundDevice {
int m_underflowUpdateCount;
};

// Wrapper function to call SoundDevicePortAudio::callbackProcess. Used by
// PortAudio, which knows nothing about C++.
int paV19Callback(const void* inputBuffer, void* outputBuffer,
unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo* timeInfo,
Expand Down
3 changes: 1 addition & 2 deletions src/soundmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ typedef PaError (*SetJackClientName)(const char *name);

SoundManager::SoundManager(ConfigObject<ConfigValue> *pConfig,
EngineMaster *pMaster)
: QObject(),
m_pMaster(pMaster),
: m_pMaster(pMaster),
m_pConfig(pConfig),
#ifdef __PORTAUDIO__
m_paInitialized(false),
Expand Down
1 change: 1 addition & 0 deletions src/soundmanagerconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SoundManagerConfig {

SoundManagerConfig();
~SoundManagerConfig();

bool readFromDisk();
bool writeToDisk() const;
QString getAPI() const;
Expand Down

0 comments on commit 7905a7e

Please sign in to comment.