Commit 0d183e21 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Refining generic path renderer example. Also, have a look at the itaVA_experimental* scripts.

parents 98275083 f099b80a
......@@ -22,7 +22,7 @@ va.setAudiofileSignalSourcePlaybackAction( X, 'play' )
va.setAudiofileSignalSourceIsLooping( X, true );
% Create a virtual sound source and set a position
S = va.createSoundSource( 'itaVA_Source', 'all' );
S = va.createSoundSource( 'itaVA_Source' );
va.setSoundSourcePosition( S, [0 1.7 -2] )
% Connect the signal source to the virtual sound source
......@@ -30,7 +30,7 @@ va.setSoundSourceSignalSource( S, X )
% Create a listener with a HRTF and position him
H = va.loadHRIRDataset( '$(DefaultHRIR)' );
L = va.createListener( 'itaVA_Listener', 'all', H );
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)
......
......@@ -2,7 +2,7 @@
% This assumes you already have set up a virtual scene without listener
% Create itaVA and connect
va = itaVA( 'localhost' );
va = itaVA( 'localhost' )
% Create a listener
L = va.createListener( 'itaVA_Tracked_Listener' );
......
......@@ -22,7 +22,7 @@ function varargout = itaVA_setup(varargin)
% Edit the above text to modify the response to help itaVA_setup
% Last Modified by GUIDE v2.5 24-Oct-2016 16:33:03
% Last Modified by GUIDE v2.5 08-Feb-2017 15:42:50
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
......@@ -86,6 +86,15 @@ if ~isempty( current_va_server_dir )
end
end
% NatNetML
current_natent_dir = which( 'NatNetML.dll' );
if ~isempty( current_natent_dir )
ainfo = NET.addAssembly( current_natent_dir );
natnetversion_raw = NatNetML.NatNetClientML( 0 ).NatNetVersion();
vs = sprintf( 'NatNetML (OptiTrack) %d.%d', natnetversion_raw(1), natnetversion_raw(2) );
set( handles.edit_natnet_version, 'String', vs )
end
uiwait( handles.figure1 );
......@@ -236,15 +245,18 @@ end
function [ found, va_component_dir ] = find_VA_Component( va_search_dir, component, recursive )
found = false;
va_component_dir = '';
if exist( fullfile( va_search_dir, component ), 'file' )
found = true;
va_component_dir = fullfile( va_search_dir ); % Base path is one folder up
end
if isempty( va_search_dir )
return % something went wrong
end
if ~va_search_dir
return;
end
if exist( fullfile( va_search_dir, component ), 'file' )
found = true;
va_component_dir = fullfile( va_search_dir ); % Base path is one folder up
end
if ~found && recursive
listing = dir( va_search_dir );
......@@ -323,3 +335,26 @@ function edit_vaserver_version_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit_natnet_version_Callback(hObject, eventdata, handles)
% hObject handle to edit_natnet_version (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_natnet_version as text
% str2double(get(hObject,'String')) returns contents of edit_natnet_version as a double
% --- Executes during object creation, after setting all properties.
function edit_natnet_version_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_natnet_version (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
......@@ -4,7 +4,17 @@
function [] = daffv17_write_metadata( fid, metadata )
%DAFF_WRITE_METADATA Write a DAFF metadata block into DAFF binary file
if ~isfield( metadata, 'name' ) || ~isfield( metadata, 'datatype' ) || ~isfield( metadata, 'value' )
%warning( 'Invalid metadata structure, skipping.' )
return
end
if ~( numel( metadata ) > 0 )
%warning( 'Empty metadata variable, skipping.' )
return
end
% Number of keys
fwrite(fid, length(metadata), 'int32');
......
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