GrandOrgue / grandorgue

GrandOrgue software
Other
148 stars 40 forks source link

Renamed some members and parameters and added some comments #1856

Closed oleg68 closed 2 months ago

oleg68 commented 3 months ago

Having started working on #1855, I am very difficulted to understand, how the tremulant state is stored because it is encoded to vmembers named Sampler Group Id.

But there is another usage of the same name: sometimes a windchest number is also encoded to a member with the similar name Sample Group Id. Sometimes the windchest number starts with 0, sometimes - with 1.

This PR brings some order into the naming. It

  1. Renames WindchestGroup to Windchest in GOOrganModel member functions
  2. Renames WindchestGroup and SampleGroup to WindchestN where it corresponds to the number from the ODF and starts with 1
  3. Renamed some parameter names
  4. Added some comments
  5. Renamed GOSoundSampler::sampler_group_id to m_SamplerTaskId
  6. Encapsulated the conversion between windchest number, tremulant number and m_SamplerTaskId in GOSoundEngine
  7. Renamed lots of variables in GOSOundEngine and GOSoundSampler
  8. Introduced the new methods GOSoundEngine::StartPipeSample and GOSoundEngine::StartTremulantSample instead the old one StartSample
  9. Removed initialising GOSoundSampler::m_SamplerTaskId and GOSoundSampler::m_AudioGroupId from GOSOundEngine::StartSampler to their callers
  10. Simplified code of GOSoundEngine::PassSampler and GOSoundEngine::StartSampler

This is just renaming and a small refactoring of GOSoundEngine. No GO behavior should be changed.

oleg68 commented 2 months ago

@larspalo @rousseldenis could you approve this pr?

oleg68 commented 2 months ago

why the tremulants earlier were read into a negative sampler group id... Was it something about the detached releases?

Tremulant groups are negatve. Windchest groups are positive. The detached release is zero.

The reason was to store all of them in a single variable.

oleg68 commented 2 months ago

@larspalo could you also approve #1858

larspalo commented 2 months ago

@oleg68 I'm trying to catch up! I've been away on a tour with the choir I'm leading so I've been unable to go through the PRs since some time...

oleg68 commented 2 months ago

@rousseldenis could you approve this PR?