Clear unknown in MxWavePresenter (#1600)

This commit is contained in:
Fabian Neundorf 2025-07-02 21:09:25 +02:00 committed by GitHub
parent 805c57b6aa
commit 40ec911811
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ protected:
void Destroy(MxBool p_fromDestructor); void Destroy(MxBool p_fromDestructor);
MxS8 GetPlayedChunks(); MxS8 GetPlayedChunks();
MxBool FUN_100b1ba0(); MxBool ReadyForNextChunk();
void WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length); void WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length);
WaveFormat* m_waveFormat; // 0x54 WaveFormat* m_waveFormat; // 0x54

View File

@ -67,7 +67,7 @@ MxS8 MxWavePresenter::GetPlayedChunks()
} }
// FUNCTION: LEGO1 0x100b1ba0 // FUNCTION: LEGO1 0x100b1ba0
MxBool MxWavePresenter::FUN_100b1ba0() MxBool MxWavePresenter::ReadyForNextChunk()
{ {
return !m_started || GetPlayedChunks() != m_writtenChunks; return !m_started || GetPlayedChunks() != m_writtenChunks;
} }
@ -248,7 +248,7 @@ MxResult MxWavePresenter::PutData()
if (IsEnabled()) { if (IsEnabled()) {
switch (m_currentTickleState) { switch (m_currentTickleState) {
case e_streaming: case e_streaming:
if (m_currentChunk && FUN_100b1ba0()) { if (m_currentChunk && ReadyForNextChunk()) {
WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength()); WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength());
m_subscriber->FreeDataChunk(m_currentChunk); m_subscriber->FreeDataChunk(m_currentChunk);
m_currentChunk = NULL; m_currentChunk = NULL;