Progress

parent 19af8e22
......@@ -10,32 +10,32 @@ va.connect( 'localhost' )
va.reset()
% Control output gain
va.setOutputGain( .25 )
va.set_output_gain( .25 )
% Add the current absolute folder path to VA application
va.addSearchPath( pwd );
va.add_search_path( pwd );
% Create a signal source and start playback
ita_write_wav( ita_demosound, 'ita_demosound.wav', 'overwrite' );
X = va.createAudiofileSignalSource( 'ita_demosound.wav' );
va.setAudiofileSignalSourcePlaybackAction( X, 'play' )
va.setAudiofileSignalSourceIsLooping( X, true );
X = va.create_signal_source_buffer_from_file( 'ita_demosound.wav' );
va.set_signal_source_buffer_playback_action( X, 'play' )
va.set_signal_source_buffer_looping( X, true );
% Create a virtual sound source and set a position
S = va.createSoundSource( 'itaVA_Source' );
va.setSoundSourcePosition( S, [0 1.7 -2] )
S = va.create_sound_source( 'itaVA_Source' );
va.set_sound_source_position( S, [0 1.7 -2] )
% Connect the signal source to the virtual sound source
va.setSoundSourceSignalSource( S, X )
va.set_sound_source_signal_source( S, X )
% Create a listener with a HRTF and position him
H = va.loadHRIRDataset( '$(DefaultHRIR)' );
L = va.createListener( 'itaVA_Listener', 'default', H );
va.setListenerPosition( L, [0 1.7 0] )
va.setListenerOrientationYPR( L, [0 0 0] ) % Default view is to -Z (OpenGL)
H = va.create_directivity( '$(DefaultHRIR)' );
L = va.create_sound_receiver( 'itaVA_Listener' );
va.set_sound_receiver_position( L, [ -2 1.7 0 ] )
va.set_sound_receiver_orientation_view_up( L, [ 0 0 -1 ], [ 0 1 0 ] )
% Set the listener as the active one
va.setActiveListener( L )
va.set_active_sound_receiver( L )
% Now close connection
va.disconnect()
......
......@@ -26,7 +26,7 @@ CVAMatlabConnection::CVAMatlabConnection()
CVAMatlabConnection::~CVAMatlabConnection()
{
if( pVAMatlabTracker->IsConnected() )
if( pVAMatlabTracker->GetConnected() )
pVAMatlabTracker->Uninitialize();
delete pVAMatlabTracker;
......
......@@ -331,7 +331,7 @@ void get_connected( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
}
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
bool bConnected = pConnection->pClient->IsConnected();
bool bConnected = pConnection->pClient->GetConnected();
plhs[ 0 ] = mxCreateLogicalScalar( bConnected );
};
......@@ -409,7 +409,7 @@ void connect( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) {
{
pConnection->pClient->Initialize( sAddress, iPort, IVANetClient::EXC_CLIENT_THROW, false );
if( !pConnection->pClient->IsConnected() )
if( !pConnection->pClient->GetConnected() )
{
// TODO: Delete object. Here were some error with double destruction. Exception in destr?
std::stringstream ss;
......@@ -595,7 +595,7 @@ void get_tracker_connected( int nlhs, mxArray *plhs[], int nrhs, const mxArray *
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
CVAMatlabTracker* pTracker = pConnection->pVAMatlabTracker;
bool bIsConnected = pTracker->IsConnected();
bool bIsConnected = pTracker->GetConnected();
if( nlhs != 1 )
{
if( bIsConnected )
......@@ -1905,7 +1905,6 @@ void set_sound_source_pose( int nlhs, mxArray *plhs[], int nrhs, const mxArray *
REGISTER_PUBLIC_FUNCTION( get_sound_receiver_ids, "Returns the IDs of all sound receivers in the scene", "" );
DECLARE_FUNCTION_OUTARG( get_sound_receiver_ids, ids, "integer-1xN", "Vector containing the IDs" );
void get_sound_receiver_ids( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) {
REQUIRE_INPUT_ARGS( 1 );
......@@ -1923,7 +1922,6 @@ void get_sound_receiver_ids( int nlhs, mxArray *plhs[], int nrhs, const mxArray
REGISTER_PUBLIC_FUNCTION( create_sound_receiver, "Creates a sound receiver", "" );
DECLARE_FUNCTION_OPTIONAL_INARG( create_sound_receiver, name, "string", "Displayed name", "''" );
DECLARE_FUNCTION_OUTARG( create_sound_receiver, id, "integer-1x1", "Sound receiver ID" );
void create_sound_receiver( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) {
REQUIRE_INPUT_ARGS( 2 );
......
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