Skip to content
Open
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
29 changes: 29 additions & 0 deletions src/OpenSHC/Audio/mss/SoundSystem/isSampleOrStreamPlaying.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "OpenSHC/Audio/MSS/SoundSystem.hpp"

namespace OpenSHC {
namespace Audio {
namespace MSS {

// FUNCTION: STRONGHOLDCRUSADER 0x00479A60
BOOLEnum SoundSystem::isSampleOrStreamPlaying(SHC_SoundStreamInt streamIndex)
{
if (!(this->waveOutOpenUnk_0x8 && this->streamActiveUnk_0x20[streamIndex])) {
return false;
}

if (streamIndex == enums::SND_STR_MUSIC) {
if (AIL_sample_status(this->musicSampleUnk_0x170) == SMP_PLAYING) {
return true;
}
} else {
HSTREAM const stream = this->stream_0xc[streamIndex];
if (stream && AIL_stream_status(stream) == SMP_PLAYING) {
return true;
}
}
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 @@ -10881,7 +10881,7 @@ SHC_3BB0A8C1_0x00479400 | 0.0% | Pending
SHC_3BB0A8C1_0x00479540 | 0.0% | Pending
SHC_3BB0A8C1_0x00479790 | 0.0% | Pending
SHC_3BB0A8C1_0x004799A0 | 0.0% | Pending
SHC_3BB0A8C1_0x00479A60 | 0.0% | Pending
SHC_3BB0A8C1_0x00479A60 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x00479AB0 | 0.0% | Pending
SHC_3BB0A8C1_0x00479AF0 | 0.0% | Pending
SHC_3BB0A8C1_0x00479B70 | 0.0% | Pending
Expand Down