Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/OpenSHC/Audio/mss/SoundSystem/getAndUpdateSampleStatus.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "OpenSHC/Audio/MSS/SoundSystem.func.hpp"

namespace OpenSHC {
namespace Audio {
namespace MSS {

// FUNCTION: STRONGHOLDCRUSADER 0x00479D90
BOOLEnum SoundSystem::getAndUpdateSampleStatus(int soundIndex)
{
if (!this->waveOutOpenUnk_0x8) {
return FALSE;
}
if (this->soundFileCurrSampleNum_0x28c[soundIndex] < 0) {
return FALSE;
}

unsigned int const status
= AIL_sample_status(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1]);
if (status == SMP_PLAYING) {
return TRUE;
}

this->sampleSoundIndex_0x20c[this->soundFileCurrSampleNum_0x28c[soundIndex]] = 0;
this->soundFileCurrSampleNum_0x28c[soundIndex] = -1;
return FALSE;
}

}
}
}
2 changes: 1 addition & 1 deletion status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10888,7 +10888,7 @@ SHC_3BB0A8C1_0x00479B70 | 0.0% | Pending
SHC_3BB0A8C1_0x00479C20 | 0.0% | Pending
SHC_3BB0A8C1_0x00479C80 | 0.0% | Pending
SHC_3BB0A8C1_0x00479CF0 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x00479D90 | 0.0% | Pending
SHC_3BB0A8C1_0x00479D90 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x00479DF0 | 0.0% | Pending
SHC_3BB0A8C1_0x00479E60 | 0.0% | Pending
SHC_3BB0A8C1_0x00479F30 | 0.0% | Pending
Expand Down