Skip to content

Commit

Permalink
Fixed absence of warnings of unused Pipe999ReleaseCrossfadeLength #1904
Browse files Browse the repository at this point in the history
… (#1980)
  • Loading branch information
oleg68 authored Aug 27, 2024
1 parent 666d2ab commit 0dbc201
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fixed absance of warnings of unused Pipe999ReleaseCrossfadeLength https://github.com/GrandOrgue/grandorgue/issues/1904
- Fixed loading organ to not abort if reading InfoFilename failed and also fixed showing link in properties dialog if InfoFilename exists
# 3.15.0 (2024-08-06)
- Added capability of regex matching audio device names https://github.com/GrandOrgue/grandorgue/issues/1265
Expand Down
26 changes: 11 additions & 15 deletions src/grandorgue/model/GOSoundingPipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ void GOSoundingPipe::Init(
}

void GOSoundingPipe::LoadAttackFileInfo(
GOConfigReader &cfg,
const wxString &group,
const wxString &prefix,
bool isMainForSecondaryAttacks) {
GOConfigReader &cfg, const wxString &group, const wxString &prefix) {
GOSoundProviderWave::AttackFileInfo ainfo;

ainfo.filename.Assign(cfg.ReadFileName(ODFSetting, group, prefix));
Expand Down Expand Up @@ -167,15 +164,14 @@ void GOSoundingPipe::LoadAttackFileInfo(
}
ainfo.m_LoopCrossfadeLength = cfg.ReadInteger(
ODFSetting, group, prefix + wxT("LoopCrossfadeLength"), 0, 3000, false, 0);
ainfo.m_ReleaseCrossfadeLength
= isMainForSecondaryAttacks || ainfo.load_release ? cfg.ReadInteger(
ODFSetting,
group,
prefix + wxT("ReleaseCrossfadeLength"),
0,
3000,
false,
0)
ainfo.m_ReleaseCrossfadeLength = ainfo.load_release ? cfg.ReadInteger(
ODFSetting,
group,
prefix + wxT("ReleaseCrossfadeLength"),
0,
3000,
false,
0)
: 0;

m_AttackFileInfos.push_back(ainfo);
Expand Down Expand Up @@ -257,11 +253,11 @@ void GOSoundingPipe::Load(
unsigned attack_count = cfg.ReadInteger(
ODFSetting, group, prefix + wxT("AttackCount"), 0, 100, false, 0);

LoadAttackFileInfo(cfg, group, prefix, attack_count > 0);
LoadAttackFileInfo(cfg, group, prefix);

for (unsigned i = 1; i <= attack_count; i++)
LoadAttackFileInfo(
cfg, group, wxString::Format(wxT("%sAttack%03d"), prefix, i), false);
cfg, group, wxString::Format(wxT("%sAttack%03d"), prefix, i));

unsigned release_count = cfg.ReadInteger(
ODFSetting, group, prefix + wxT("ReleaseCount"), 0, 100, false, 0);
Expand Down
5 changes: 1 addition & 4 deletions src/grandorgue/model/GOSoundingPipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ class GOSoundingPipe : public GOPipe,
* add it to m_AttackFileInfos
*/
void LoadAttackFileInfo(
GOConfigReader &cfg,
const wxString &group,
const wxString &prefix,
bool isMain);
GOConfigReader &cfg, const wxString &group, const wxString &prefix);
/* Read one release file info from the odf keys with the prefix specified and
* add it to m_AttackFileInfos
*/
Expand Down

0 comments on commit 0dbc201

Please sign in to comment.