Progress

parent 526e2109
......@@ -53,6 +53,7 @@ endif( )
# Qt UI form compiler
qt5_wrap_ui( "ui_RedstartWindow.h" "ui/RedstartWindow.ui" )
qt5_wrap_ui( "ui_RedstartSessionBinauralHeadphonesDialog.h" "ui/RedstartSessionBinauralHeadphonesDialog.ui" )
include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) # Qt UI form compiler generates files into this folder
......@@ -61,7 +62,7 @@ include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) # Qt UI form compiler gener
qt5_add_resources( VA_REDSTART_RESOURCES "res/QRedstart.qrc" OPTIONS -compress 3 )
add_executable( Redstart ${VA_REDSTART_RESOURCES} "src/main.cpp" "src/RedstartWindow.cpp" "src/RedstartWindow.h" "src/RedstartUtils.h" "ui/RedstartWindow.ui" )
add_executable( Redstart ${VA_REDSTART_RESOURCES} "src/main.cpp" "src/RedstartWindow.cpp" "src/RedstartWindow.h" "src/RedstartRunSimpleExample.h" "src/RedstartUtils.h" "src/RedstartSessionBinauralHeadphonesDialog.h" "ui/RedstartWindow.ui" "ui/RedstartSessionBinauralHeadphonesDialog.ui" )
target_link_libraries( Redstart ${VISTA_USE_PACKAGE_LIBRARIES} ${VISTAINTERPROCCOMM_ADDITIONAL_DEPENDENCIES} Qt5::Widgets )
install( TARGETS Redstart RUNTIME DESTINATION "bin" )
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_REDSTART_RUN_SIMPLE_EXAMPLE
#define IW_REDSTART_RUN_SIMPLE_EXAMPLE
#include <VA.h>
inline void RunSimpleExample( IVAInterface* pVA )
{
const std::string sSignalSourceID = pVA->CreateSignalSourceBufferFromFile( "$(DemoSound)" );
pVA->SetSignalSourceBufferPlaybackAction( sSignalSourceID, IVAInterface::VA_PLAYBACK_ACTION_PLAY );
pVA->SetSignalSourceBufferLooping( sSignalSourceID, true );
const int iSoundSourceID = pVA->CreateSoundSource( "Redstart C++ example sound source" );
pVA->SetSoundSourcePose( iSoundSourceID, VAVec3( 2.0f, 1.7f, 2.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
pVA->SetSoundSourceSignalSource( iSoundSourceID, sSignalSourceID );
const int iHRIR = pVA->CreateDirectivityFromFile( "$(DefaultHRIR)" );
const int iSoundReceiverID = pVA->CreateSoundReceiver( "Redstart C++ example sound receiver" );
pVA->SetSoundReceiverPose( iSoundReceiverID, VAVec3( 0.0f, 1.7f, 0.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
pVA->SetSoundReceiverDirectivity( iSoundReceiverID, iHRIR );
};
#endif // IW_REDSTART_RUN_SIMPLE_EXAMPLE
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_REDSTART_SESSION_BINAURAL_HEADPHONES_DIALOG
#define IW_REDSTART_SESSION_BINAURAL_HEADPHONES_DIALOG
#include <QDialog>
#include <QDir>
#include <QString>
#include <QSettings>
#include <QHash>
#include "ui_RedstartSessionBinauralHeadphonesDialog.h"
namespace Ui
{
class RedstartSessionBinauralHeadphonesDialog;
}
class RedstartSessionBinauralHeadphonesDialog : public QDialog
{
Q_OBJECT
public:
inline explicit RedstartSessionBinauralHeadphonesDialog( QWidget *parent )
: QDialog( parent ),
ui( new Ui::RedstartSessionBinauralHeadphonesDialog )
{
ui->setupUi( this );
};
inline ~RedstartSessionBinauralHeadphonesDialog()
{
//m_qSettings.setValue( "Redstart/Sessions/", ui->checkBox_IncludeAllChannels->checkState() );
};
QVariantHash GetCoreConfig() const
{
QVariantHash oHash;
//ui->line
return oHash;
};
private slots:
private:
Ui::RedstartSessionBinauralHeadphonesDialog *ui;
QDir m_oBasePath;
QString m_sFileBaseName;
QSettings m_qSettings;
};
#endif // IW_REDSTART_SESSION_BINAURAL_HEADPHONES_DIALOG
This diff is collapsed.
......@@ -72,12 +72,12 @@ public:
inline CAudioDeviceSpecs()
{
int iDriverNumber = -1;
int iNumInputChannels = -1;
int iNumOutputChannels = -1;
bool bInitializable = false;
bool bDefaultDevice = false;
int iBackend = -1;
iDriverNumber = -1;
iNumInputChannels = -1;
iNumOutputChannels = -1;
bInitializable = false;
bDefaultDevice = false;
iBackend = -1;
};
inline CAudioDeviceSpecs( const QVariantHash& oHash )
......@@ -130,6 +130,12 @@ private slots:
void on_checkBox_portaudio_default_device_clicked();
void on_listView_redstart_session_list_clicked( const QModelIndex &index );
void on_actionBinauralHeadphones_triggered();
void on_actionDefault_experimental_session_triggered();
void on_actionRunSimpleExample_triggered();
private:
void PostCoreStart();
void PostCoreStop();
......@@ -144,19 +150,16 @@ private:
IVANetServer* m_pVANetServer;
std::vector< CAudioDeviceSpecs > m_voAudioDevices;
int m_iPortaudioDefaultDevice;
QSettings m_qSettings;
void LoadConfiguration();
void StoreConfiguration();
void PopulateAudioDevices();
void AcquireAsioDevices();
void PopulateAsioDevicesFromSettings();
void AcquirePortaudioDevices();
void PopulatePortaudioDevicesFromSettings();
void PopulateAudioDevices();
};
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RedstartDialogSessionBinauralHeadphones</class>
<widget class="QDialog" name="RedstartDialogSessionBinauralHeadphones">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>609</width>
<height>240</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Headphone channels</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>DefaultHRIR macro value</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="lineEdit_macro_DemoSound">
<property name="text">
<string>WelcomeToVA.wav</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_BrowseDemoSound">
<property name="text">
<string>Select</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>DemoSound macro label</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLineEdit" name="lineEdit_macro_DefaultHRIR">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ITA-Kunstkopf_5x5_256_44kHz.v17.ir.daff</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="pushButton_BrowseHRIR">
<property name="text">
<string>Select</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QCheckBox" name="checkBox_folders_as_search_path">
<property name="text">
<string>Add all base folders as search paths (instead of using absolute paths)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLineEdit" name="lineEdit_headphone_channels">
<property name="text">
<string>1,2</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="lineEdit_session_name">
<property name="text">
<string>MyBinauralHeadphoneSession</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Session name</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="toolTip">
<string>The filter length is only used to define the convolution engine length. Use a power of 2 and at least the filter length of your HRIR.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>HRIR filter length</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_hrir_filter_length">
<property name="toolTip">
<string>The filter length is only used to define the convolution engine length. Use a power of 2 and at least the filter length of your HRIR.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>256</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_6">
<property name="toolTip">
<string>The filter length is only used to define the convolution engine length. Use a power of 2 and at least the filter length of your HRIR.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Samples</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButton_CreateSession">
<property name="text">
<string>Create binaural headphone session</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -65,8 +65,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1025</width>
<height>658</height>
<width>1023</width>
<height>661</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="0,0,0,0,1">
......@@ -176,17 +176,17 @@ background-color: rgb(254, 228, 255);</string>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout_redstart_network">
<item row="0" column="0">
<widget class="QLabel" name="label">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>TCP/IP server address</string>
<string>TCP/IP port</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>TCP/IP port</string>
<string>TCP/IP server address</string>
</property>
</widget>
</item>
......@@ -204,7 +204,7 @@ background-color: rgb(254, 228, 255);</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<item row="2" column="1">
<widget class="QCheckBox" name="checkBox_redstart_network_connect_as_client">
<property name="text">
<string>Connect as client</string>
......@@ -515,6 +515,9 @@ background-color: rgb(208, 255, 188);</string>
<property name="pageStep">
<number>3</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
......@@ -552,6 +555,9 @@ background-color: rgb(208, 255, 188);</string>
<property name="sliderPosition">
<number>0</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
......@@ -809,7 +815,7 @@ background-color: rgb(208, 255, 188);</string>
<addaction name="separator"/>
<addaction name="actionOpen_session"/>
<addaction name="separator"/>
<addaction name="actionDefault_binaural_session"/>
<addaction name="actionBinauralHeadphones"/>
<addaction name="actionDefault_experimental_session"/>
</widget>
<widget class="QMenu" name="menuCrurrent_session">
......@@ -828,7 +834,7 @@ background-color: rgb(208, 255, 188);</string>
<addaction name="separator"/>
<addaction name="actionPreferences"/>
<addaction name="separator"/>
<addaction name="actionQuit_2"/>
<addaction name="actionQuit"/>
</widget>
<widget class="QMenu" name="menuRun">
<property name="enabled">
......@@ -837,7 +843,7 @@ background-color: rgb(208, 255, 188);</string>
<property name="title">
<string>Run</string>
</property>
<addaction name="actionSimple_example"/>
<addaction name="actionRunSimpleExample"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
......@@ -855,11 +861,6 @@ background-color: rgb(208, 255, 188);</string>
<addaction name="menuRun"/>
<addaction name="menuHelp"/>
</widget>
<action name="actionQuit">
<property name="text">
<string>Quit</string>
</property>
</action>
<action name="actionOpen_session">
<property name="text">
<string>Import session from file</string>
......@@ -881,7 +882,7 @@ background-color: rgb(208, 255, 188);</string>
<string>Save session as ...</string>
</property>
</action>
<action name="actionQuit_2">
<action name="actionQuit">
<property name="text">
<string>Quit</string>
</property>
......@@ -891,7 +892,7 @@ background-color: rgb(208, 255, 188);</string>
<string>Session wizard</string>
</property>
</action>
<action name="actionSimple_example">
<action name="actionRunSimpleExample">
<property name="text">
<string>Simple example</string>
</property>
......@@ -911,14 +912,14 @@ background-color: rgb(208, 255, 188);</string>
<string>Empty session</string>
</property>
</action>
<action name="actionDefault_binaural_session">
<action name="actionBinauralHeadphones">
<property name="text">
<string>Default binaural session</string>
<string>Binaural headphones</string>
</property>
</action>
<action name="actionDefault_experimental_session">
<property name="text">
<string>Default experimental session</string>
<string>Experimental</string>
</property>
</action>
<action name="actionExport_to_file">
......
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