Changing license. And Fix in reproduction gain setter.

parent 2d99667a
Copyright 2015-2016 Institute of Technical Acoustics, RWTH Aachen University
Any usage and distribution is prohibited, unless explicitly granted by the authors.
\ No newline at end of file
Licensed under the Apache License, Version 2.0 (the "License");
you may not use files of this project except in compliance with the License.
You may obtain a copy of the License at
<http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
......@@ -2,14 +2,15 @@
VAMatlab is a binding to the VA interface for Matlab. It uses the VA network connection to forward commands and receive information to a VA server, usually the VAServer application.
### License
Copyright 2015-2016 Institute of Technical Acoustics, RWTH Aachen University
See [LICENSE](LICENSE.md) file.
Any usage and distribution is prohibited, unless explicitly granted by the authors.
### Quick build guide
#### Matlab executable
Open Matlab and run the script `VAMatlabExecutable_build.m`.
......@@ -18,12 +19,14 @@ There is a switch that can link the VACore into the Matlab executable, hence no
To activate this, the preprocessor flag `VAMATLAB_WITH_LOCAL_CORE` has to be defined and set to 1. Use the switch in the build script configuration section.
To also include a lightweight Optitrack tracker connection using the NatNetSDK, define the preprocessor flag `VAMATLAB_WITH_OPTITRACK` and set it to 1. Use the switch in the build script configuration section.
#### itaVA class
To ease usage, a facade class called `itaVA` can be generated that will also add volatile help on the available functionality of VA.
To create this Matlab class, run `itaVA_build.m`, which will create a class file `itaVA.m` based on stubs that are filled by calls to the VAMatlab executable, which has to be build prior.
> Make sure that Matlab will use the correct VA Matlab executable and not an older version of it which might have been added to the PATH of Matlab.
#### Deploy
Deploying the Matlab executable will require to copy all necessary DLLs into a deploy directory (next to the VAMatlab executable file).
......
......@@ -3115,7 +3115,7 @@ void setReproductionModuleGain( int nlhs, mxArray *plhs[], int nrhs, const mxArr
CVAMatlabConnection* pConnection = g_vpConnections[hHandle];
std::string sID = matlabGetString( prhs[1], "sModuleID" );
double dGain = matlabGetIntegerScalar( prhs[2], "dGain" );
double dGain = matlabGetRealScalar( prhs[2], "dGain" );
pConnection->pCoreInterface->SetReproductionModuleGain( sID, dGain );
}
......@@ -3187,7 +3187,7 @@ void setRenderingModuleGain( int nlhs, mxArray *plhs[], int nrhs, const mxArray
CVAMatlabConnection* pConnection = g_vpConnections[hHandle];
std::string sID = matlabGetString( prhs[1], "sModuleID" );
double dGain = matlabGetIntegerScalar( prhs[2], "dGain" );
double dGain = matlabGetRealScalar( prhs[2], "dGain" );
pConnection->pCoreInterface->SetRenderingModuleGain( sID, dGain );
}
......@@ -3255,19 +3255,27 @@ void getRenderingModuleGain( int nlhs, mxArray *plhs[], int nrhs, const mxArray
#ifdef WIN32
// Wchter, der automatisch das Kernel-Handle freigibt, wenn die DLL entladen wird
class HandleGuard {
class HandleGuard
{
public:
HANDLE hHandle;
HandleGuard() : hHandle(0) {}
~HandleGuard() { Reset(); }
inline HandleGuard()
: hHandle( 0 ) {};
inline ~HandleGuard()
{
Reset();
};
void Reset() {
if (hHandle != 0) {
CloseHandle(hHandle);
inline void Reset()
{
if( hHandle != 0 )
{
CloseHandle( hHandle );
hHandle = 0;
}
}
};
};
static HandleGuard g_oTimerHandle;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment