Bug 930532: Adjust '#if defined(MOZ_CUBEB)' checks to include cubeb-only static functions in AudioStream.cpp, to fix build warnings in non-cubeb builds. r=padenot

This commit is contained in:
Daniel Holbert 2013-10-24 17:26:19 +02:00
parent ee3e66ad1e
commit fdf896f1df

View File

@ -53,7 +53,9 @@ uint32_t AudioStream::mPreferredSampleRate = 0;
* dumped-audio-<nnn>.wav, one per nsBufferedAudioStream created, containing
* the audio for the stream including any skips due to underruns.
*/
#if defined(MOZ_CUBEB)
static int gDumpedAudioCount = 0;
#endif
static int PrefChanged(const char* aPref, void* aClosure)
{
@ -78,13 +80,13 @@ static int PrefChanged(const char* aPref, void* aClosure)
return 0;
}
#if defined(MOZ_CUBEB)
static double GetVolumeScale()
{
MutexAutoLock lock(*gAudioPrefsLock);
return gVolumeScale;
}
#if defined(MOZ_CUBEB)
static cubeb* gCubebContext;
static cubeb* GetCubebContext()
@ -466,6 +468,7 @@ int AudioStream::PreferredSampleRate()
return mPreferredSampleRate;
}
#if defined(MOZ_CUBEB)
static void SetUint16LE(uint8_t* aDest, uint16_t aValue)
{
aDest[0] = aValue & 0xFF;
@ -535,7 +538,6 @@ WriteDumpFile(FILE* aDumpFile, AudioStream* aStream, uint32_t aFrames,
fflush(aDumpFile);
}
#if defined(MOZ_CUBEB)
BufferedAudioStream::BufferedAudioStream()
: mMonitor("BufferedAudioStream"), mLostFrames(0), mDumpFile(nullptr),
mVolume(1.0), mBytesPerFrame(0), mState(INITIALIZED)