Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sh95014 committed Dec 12, 2023
2 parents 1d88116 + 3cda77c commit 139eb4b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion source/frontends/libretro/rdirectsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ namespace ra2
bool found = false;
for (const auto & it : activeSoundGenerators)
{
const auto generator = it.second;
const auto & generator = it.second;
if (generator->isRunning())
{
const bool selected = !found && (generator->getNumberOfChannels() == channels);
Expand Down
2 changes: 1 addition & 1 deletion source/frontends/qt/audioinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void AudioInfo::updateInfo(const qint64 speed, const qint64 target)
myCounter = 0;
const std::vector<QDirectSound::SoundInfo> & info = QDirectSound::getAudioInfo();

QString s("Channels Buffer Underrruns\n");
QString s("Channels Buffer Underruns\n");
for (const auto & i : info)
{
if (i.running)
Expand Down
6 changes: 3 additions & 3 deletions source/frontends/qt/qdirectsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ namespace QDirectSound
defaultDuration = duration;
for (const auto & it : activeSoundGenerators)
{
const auto generator = it.second;
const auto & generator = it.second;
generator->setOptions(duration);
}
}
Expand All @@ -196,8 +196,8 @@ namespace QDirectSound

for (const auto & it : activeSoundGenerators)
{
const auto & generator = it.second;
info.push_back(generator->getInfo());
const auto & generator = it.second;
info.push_back(generator->getInfo());
}

return info;
Expand Down
13 changes: 3 additions & 10 deletions source/frontends/sdl/sdirectsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ namespace
virtual HRESULT Stop() override;
virtual HRESULT Play( DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags ) override;

void resetUnderruns();

void printInfo();
sa2::SoundInfo getInfo();

Expand Down Expand Up @@ -194,11 +192,6 @@ namespace
return info;
}

void DirectSoundGenerator::resetUnderruns()
{
ResetUnderrruns();
}

uint8_t * DirectSoundGenerator::mixBufferTo(uint8_t * stream)
{
// we could copy ADJUST_VOLUME from SDL_mixer.c and avoid all copying and (rare) race conditions
Expand Down Expand Up @@ -243,7 +236,7 @@ namespace sa2
{
for (const auto & it : activeSoundGenerators)
{
const auto generator = it.second;
const auto & generator = it.second;
generator->printInfo();
}
}
Expand All @@ -252,8 +245,8 @@ namespace sa2
{
for (const auto & it : activeSoundGenerators)
{
const auto generator = it.second;
generator->resetUnderruns();
const auto & generator = it.second;
generator->ResetUnderruns();
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/linux/libwindows/dsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ size_t IDirectSoundBuffer::GetBufferUnderruns() const
return myNumberOfUnderruns;
}

void IDirectSoundBuffer::ResetUnderrruns()
void IDirectSoundBuffer::ResetUnderruns()
{
myNumberOfUnderruns = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion source/linux/libwindows/dsound.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class IDirectSoundBuffer : public IUnknown
DWORD Read( DWORD dwReadBytes, LPVOID * lplpvAudioPtr1, DWORD * lpdwAudioBytes1, LPVOID * lplpvAudioPtr2, DWORD * lpdwAudioBytes2);
DWORD GetBytesInBuffer();
size_t GetBufferUnderruns() const;
void ResetUnderrruns();
void ResetUnderruns();
double GetLogarithmicVolume() const; // in [0, 1]

#ifdef MARIANI
Expand Down

0 comments on commit 139eb4b

Please sign in to comment.