Skip to content

Commit

Permalink
Implement MidiOutput::Play
Browse files Browse the repository at this point in the history
Signed-off-by: Mary Guillemard <[email protected]>
  • Loading branch information
marysaka authored and roblabla committed Nov 2, 2024
1 parent 22261b6 commit cc7be6c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/implemented.csv
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ th06::MidiOutput::MidiOutput
th06::MidiOutput::LoadTracks
th06::MidiOutput::ClearTracks
th06::MidiOutput::LoadFile
th06::MidiOutput::Play
th06::MidiOutput::UnprepareHeader
th06::MidiOutput::ReadFileData
th06::MidiOutput::ReleaseFileData
Expand Down
1 change: 0 additions & 1 deletion config/stubbed.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ th06::AsciiManager::DrawPopupsWithHwVertexProcessing
th06::AsciiManager::DrawPopupsWithoutHwVertexProcessing
th06::AnmManager::DrawEndingRect
th06::MidiOutput::OnTimerElapsed
th06::MidiOutput::Play
th06::MidiOutput::ParseFile
th06::ResultScreen::OpenScore
th06::ResultScreen::ParseClrd
Expand Down
14 changes: 14 additions & 0 deletions src/MidiOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,20 @@ ZunResult MidiOutput::LoadFile(char *midiPath)
return ZUN_SUCCESS;
}

ZunResult MidiOutput::Play()
{
if (this->tracks == NULL)
{
return ZUN_ERROR;
}

this->LoadTracks();
this->midiOutDev.OpenDevice(0xFFFFFFFF);
this->StartTimer(1, NULL, NULL);

return ZUN_SUCCESS;
}

u32 MidiOutput::SetFadeOut(u32 ms)
{
this->fadeOutVolumeMultiplier = 0.0;
Expand Down

0 comments on commit cc7be6c

Please sign in to comment.