Skip to content

Commit

Permalink
Reset volume levels everytime a sample is played
Browse files Browse the repository at this point in the history
Some events cause volume levels to be lowered, this will prevent
those events from impacting other recorded events
  • Loading branch information
aaaaaaaaaaaaaaaaaxaaaaaa committed Jul 12, 2019
1 parent 9f5d604 commit b492789
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions MSD/MSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ void _Record(Project project) {
MilesQueueControllerValue(project.queue, "GameMusicVolume", 1);
MilesQueueControllerValue(project.queue, "DialogueVolume", 1);
MilesQueueEventRunByTemplateId(project.queue, (int*)& out);
SetupBusVolumes(project.driver);
MilesQueueSubmit(project.queue);

while (recorder->Active()) {
Expand Down Expand Up @@ -123,6 +124,7 @@ void _Play(Project project) {
MilesQueueControllerValue(project.queue, "GameMusicVolume", 1);
MilesQueueControllerValue(project.queue, "DialogueVolume", 1);
MilesQueueEventRunByTemplateId(project.queue, (int*)& out);
SetupBusVolumes(project.driver);
MilesQueueSubmit(project.queue);
}
}
Expand Down
7 changes: 3 additions & 4 deletions MSD/Miles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ namespace fs = std::filesystem;

void SetupBusVolumes(Driver driver)
{
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "Master"), 1);
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "Voice_Comm_bus"), 1);
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "SFX_ui"), 1);
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "SFX"), 1);
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "Master"), 0.7f);
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "Voice_Comm_bus"), 0.7f);
MilesBusSetVolumeLevel(MilesProjectGetBus(driver, "MUSIC"), 0.7f);
}

std::vector<std::string> GetEventNames(Bank bank)
Expand Down

0 comments on commit b492789

Please sign in to comment.