diff options
-rw-r--r-- | backends/audiocd/audiocd-stream.cpp | 2 | ||||
-rw-r--r-- | backends/audiocd/audiocd-stream.h | 18 | ||||
-rw-r--r-- | backends/audiocd/linux/linux-audiocd.cpp | 20 | ||||
-rw-r--r-- | backends/audiocd/macosx/macosx-audiocd.cpp | 2 | ||||
-rw-r--r-- | backends/audiocd/win32/win32-audiocd.cpp | 58 |
5 files changed, 50 insertions, 50 deletions
diff --git a/backends/audiocd/audiocd-stream.cpp b/backends/audiocd/audiocd-stream.cpp index da55654a1d..7265b7f135 100644 --- a/backends/audiocd/audiocd-stream.cpp +++ b/backends/audiocd/audiocd-stream.cpp @@ -51,7 +51,7 @@ int AudioCDStream::readBuffer(int16 *buffer, const int numSamples) { return samples; // Copy the samples over - for (_bufferPos = 0; _bufferPos < kSamplesPerFrame && samples < numSamples; ) + for (_bufferPos = 0; _bufferPos < kSamplesPerFrame && samples < numSamples;) buffer[samples++] = _buffer[_bufferPos++]; } diff --git a/backends/audiocd/audiocd-stream.h b/backends/audiocd/audiocd-stream.h index a8938025b6..e63c060c54 100644 --- a/backends/audiocd/audiocd-stream.h +++ b/backends/audiocd/audiocd-stream.h @@ -70,17 +70,17 @@ private: Common::Queue<int16 *> _bufferQueue; int _bufferFrame; - Common::Mutex _mutex; + Common::Mutex _mutex; - bool _forceStop; - bool shouldForceStop() const; - void forceStop(); - Common::Mutex _forceStopMutex; + bool _forceStop; + bool shouldForceStop() const; + void forceStop(); + Common::Mutex _forceStopMutex; - bool readNextFrame(); - static void timerProc(void *refCon); - void onTimer(); - void emptyQueue(); + bool readNextFrame(); + static void timerProc(void *refCon); + void onTimer(); + void emptyQueue(); }; #endif diff --git a/backends/audiocd/linux/linux-audiocd.cpp b/backends/audiocd/linux/linux-audiocd.cpp index b48ce78b94..b3d355fecd 100644 --- a/backends/audiocd/linux/linux-audiocd.cpp +++ b/backends/audiocd/linux/linux-audiocd.cpp @@ -94,7 +94,7 @@ private: }; LinuxAudioCDStream::LinuxAudioCDStream(int fd, const cdrom_tocentry &startEntry, const cdrom_tocentry &endEntry) : - _fd(fd), _startEntry(startEntry), _endEntry(endEntry) { + _fd(fd), _startEntry(startEntry), _endEntry(endEntry) { startTimer(); } @@ -264,7 +264,7 @@ bool LinuxAudioCDManager::play(int track, int numLoops, int startFrame, int dura return false; // HACK: For now, just assume that track number is right - // That only works because ScummVM uses the wrong track number anyway + // That only works because ScummVM uses the wrong track number anyway if (track >= (int)_tocEntries.size() - 1) { warning("No such track %d", track); @@ -289,14 +289,14 @@ bool LinuxAudioCDManager::play(int track, int numLoops, int startFrame, int dura _emulating = true; _mixer->playStream( - Audio::Mixer::kMusicSoundType, - &_handle, - Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), - -1, - _cd.volume, - _cd.balance, - DisposeAfterUse::YES, - true); + Audio::Mixer::kMusicSoundType, + &_handle, + Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), + -1, + _cd.volume, + _cd.balance, + DisposeAfterUse::YES, + true); return true; } diff --git a/backends/audiocd/macosx/macosx-audiocd.cpp b/backends/audiocd/macosx/macosx-audiocd.cpp index 07d8d31f26..d6ff0be99b 100644 --- a/backends/audiocd/macosx/macosx-audiocd.cpp +++ b/backends/audiocd/macosx/macosx-audiocd.cpp @@ -224,7 +224,7 @@ bool MacOSXAudioCDManager::play(int track, int numLoops, int startFrame, int dur _emulating = true; _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, - Audio::makeLoopingAudioStream(seekStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), -1, _cd.volume, _cd.balance); + Audio::makeLoopingAudioStream(seekStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), -1, _cd.volume, _cd.balance); return true; } diff --git a/backends/audiocd/win32/win32-audiocd.cpp b/backends/audiocd/win32/win32-audiocd.cpp index 0b04a7ca5d..d9747467c7 100644 --- a/backends/audiocd/win32/win32-audiocd.cpp +++ b/backends/audiocd/win32/win32-audiocd.cpp @@ -73,7 +73,7 @@ private: }; Win32AudioCDStream::Win32AudioCDStream(HANDLE handle, const TRACK_DATA &startEntry, const TRACK_DATA &endEntry) : - _driveHandle(handle), _startEntry(startEntry), _endEntry(endEntry), _buffer(), _frame(0), _bufferPos(kSamplesPerFrame), _bufferFrame(0) { + _driveHandle(handle), _startEntry(startEntry), _endEntry(endEntry), _buffer(), _frame(0), _bufferPos(kSamplesPerFrame), _bufferFrame(0) { startTimer(); } @@ -99,14 +99,14 @@ bool Win32AudioCDStream::readFrame(int frame, int16 *buffer) { DWORD bytesReturned; return DeviceIoControl( - _driveHandle, - IOCTL_CDROM_RAW_READ, - &readAudio, - sizeof(readAudio), - buffer, - kBytesPerFrame, - &bytesReturned, - NULL); + _driveHandle, + IOCTL_CDROM_RAW_READ, + &readAudio, + sizeof(readAudio), + buffer, + kBytesPerFrame, + &bytesReturned, + NULL); } @@ -173,7 +173,7 @@ bool Win32AudioCDManager::openCD(int drive) { close(); return false; } - + return true; } @@ -230,7 +230,7 @@ bool Win32AudioCDManager::play(int track, int numLoops, int startFrame, int dura return false; // HACK: For now, just assume that track number is right - // That only works because ScummVM uses the wrong track number anyway + // That only works because ScummVM uses the wrong track number anyway if (track >= (int)_tocEntries.size() - 1) { warning("No such track %d", track); @@ -255,14 +255,14 @@ bool Win32AudioCDManager::play(int track, int numLoops, int startFrame, int dura _emulating = true; _mixer->playStream( - Audio::Mixer::kMusicSoundType, - &_handle, - Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), - -1, - _cd.volume, - _cd.balance, - DisposeAfterUse::YES, - true); + Audio::Mixer::kMusicSoundType, + &_handle, + Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), + -1, + _cd.volume, + _cd.balance, + DisposeAfterUse::YES, + true); return true; } @@ -272,23 +272,23 @@ bool Win32AudioCDManager::loadTOC() { tocRequest.Format = CDROM_READ_TOC_EX_FORMAT_TOC; tocRequest.Msf = 1; tocRequest.SessionTrack = 0; - + DWORD bytesReturned; CDROM_TOC tocData; bool result = DeviceIoControl( - _driveHandle, - IOCTL_CDROM_READ_TOC_EX, - &tocRequest, - sizeof(tocRequest), - &tocData, - sizeof(tocData), - &bytesReturned, - NULL); + _driveHandle, + IOCTL_CDROM_READ_TOC_EX, + &tocRequest, + sizeof(tocRequest), + &tocData, + sizeof(tocData), + &bytesReturned, + NULL); if (!result) { debug("Failed to query the CD TOC: %d", (int)GetLastError()); return false; } - + _firstTrack = tocData.FirstTrack; _lastTrack = tocData.LastTrack; #if 0 |