GrandOrgue / grandorgue

GrandOrgue software
Other
172 stars 43 forks source link

Fixed not sounding of pipe after an enclosure has closed to zero and then opened https://github.com/GrandOrgue/grandorgue/issues/1813 #1910

Closed oleg68 closed 5 months ago

oleg68 commented 6 months ago

Resolves: #1813

For fixing the issue I completelly reworked the GOSoundFader class. Earlier it calculated only the total volue that was depending on the enclosure volume. So it was not feasible to differentiate between finishing the decay and setting enclosure volume to 0.

Now GOSoundFader calculates two volumes: target volume and external volume. GOSoundFader::IsSilent() takes into account only fade of the target volume, but not the external volume.

larspalo commented 6 months ago

@oleg68 It seems to be working fine. There are a few un-important spelling mistakes in the comments though. However, more important, since long all the enclosures on the built in (floating and volume) panel would have the default AmpMinLevel of 1 in the Init of /src/grandorgue/model/GOEnclosure.cpp file to take into account the previous behaviour (of killing the sound at an amplitude of 0). Since this PR changes that behaviour it might be appropriate to also change the amp min level of the built in volume controls in the Init to reflect this change?

oleg68 commented 6 months ago

@larspalo I changed the min level of internal enclosures to 0

oleg68 commented 5 months ago

@rousseldenis Could you approve this PR?