mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
BACKENDS: Formatting fixes.
This commit is contained in:
parent
c6c0f527a7
commit
90899860b4
@ -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++];
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user