Skip to content

Commit

Permalink
Fix nl2wrapper: Allow --compSpeed=2
Browse files Browse the repository at this point in the history
Summary: Fixes github issue #61

Test Plan: Execute with --compSpeed=2

Differential Revision: https://dev.openmha.org/D722
  • Loading branch information
Tobias Herzke authored and tobiasherzke committed Aug 8, 2023
1 parent 07760e0 commit 3144f4c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README_NALNL2.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ needs to be purchased from the National Acoustic Laboratories independently.
### Windows:
1) Install closed-source MHA or openMHA as documented
2) Download and install
http://mha.hoertech.de/fitting/nalnl2wrapper-2021.06-installer.exe
http://mha.hoertech.de/fitting/nalnl2wrapper-2023.08-installer.exe
3) Store a licensed copy of NAL-NL2.dll in directory
C:\Program Files\nalnl2wrapper\bin

Expand Down
10 changes: 5 additions & 5 deletions mha/tools/fitting/NAL-NL2/nalnl2wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ int main(int argc, char* argv[])

for(const auto lvl : fitmodel.level){
for( int i = 0; i < 19; i++ ){
data[i] = -99;
}
data[i] = -99;
}
RealEarInsertionGain_NL2(data, client.ac.data(), client.bc.data(), lvl, fitmodel.limiting, fitmodel.channels, fitmodel.direction, fitmodel.mic, client.acOther.data(), fitmodel.bilateral);


// output to console
for( int i = 0; i < 19; i++ ){
std::cout << data[i] << " ";
}
for( int i = 0; i < 19; i++ ){
std::cout << data[i] << " ";
}
std::cout << "\n";
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion mha/tools/fitting/NAL-NL2/packaging/deb/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0
2023.08
2 changes: 1 addition & 1 deletion mha/tools/fitting/NAL-NL2/packaging/exe/nalnl2wrapper.nsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
!define PRODUCT_NAME nalnl2wrapper
!define PRODUCT_VERSION 2021.06
!define PRODUCT_VERSION 2023.08
!define PRODUCT_PUBLISHER HoerTech
BrandingText "A command line wrapper for the NAL NL2 fitting rule"
RequestExecutionLevel admin
Expand Down
2 changes: 1 addition & 1 deletion mha/tools/fitting/NAL-NL2/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ std::pair<Client,Fitmodel> parser(int argc, char **argv) {
case 'i': // --compSpeed=...
{
auto arg=parseSingle<int>(optarg,option_index);
if(arg!=0 and arg!=1)
if(arg<=0 and arg>=2)
throw std::invalid_argument("Invalid compSpeed: Expected: 0, 1, or 2. Got: "+std::to_string(arg));
fitmodel.compSpeed=arg;
}
Expand Down

0 comments on commit 3144f4c

Please sign in to comment.