diff --git a/src/sounddeviceportaudio.h b/src/sounddeviceportaudio.h index e608d6cc2f5..38b90d56d53 100644 --- a/src/sounddeviceportaudio.h +++ b/src/sounddeviceportaudio.h @@ -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, @@ -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, diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp index 8222e68e715..eb999e1746d 100644 --- a/src/soundmanager.cpp +++ b/src/soundmanager.cpp @@ -38,8 +38,7 @@ typedef PaError (*SetJackClientName)(const char *name); SoundManager::SoundManager(ConfigObject *pConfig, EngineMaster *pMaster) - : QObject(), - m_pMaster(pMaster), + : m_pMaster(pMaster), m_pConfig(pConfig), #ifdef __PORTAUDIO__ m_paInitialized(false), diff --git a/src/soundmanagerconfig.h b/src/soundmanagerconfig.h index 5d1d8fba22c..6a7fbdd169f 100644 --- a/src/soundmanagerconfig.h +++ b/src/soundmanagerconfig.h @@ -44,6 +44,7 @@ class SoundManagerConfig { SoundManagerConfig(); ~SoundManagerConfig(); + bool readFromDisk(); bool writeToDisk() const; QString getAPI() const;