diff --git a/audiodevices.cpp b/audiodevices.cpp index 2c4825b..4c3bc4d 100644 --- a/audiodevices.cpp +++ b/audiodevices.cpp @@ -37,13 +37,14 @@ void audioDevices::enumerate() { Pa_Terminate(); + #if (QT_VERSION < QT_VERSION_CHECK(6,0,0)) foreach(const QAudioDeviceInfo & deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)) #else const auto audioInputs = mediaDevices.audioInputs(); for (const QAudioDevice& deviceInfo : audioInputs) #endif - { + { bool isDefault = false; if (numInputDevices == 0) { @@ -81,7 +82,7 @@ void audioDevices::enumerate() #endif #if (defined(Q_OS_WIN) && (QT_VERSION < QT_VERSION_CHECK(6,0,0))) - } + } #endif numInputDevices++; } @@ -136,7 +137,7 @@ void audioDevices::enumerate() #endif #if (defined(Q_OS_WIN) && (QT_VERSION < QT_VERSION_CHECK(6,0,0))) - } + } #endif numOutputDevices++; } diff --git a/audiodevices.h b/audiodevices.h index 5943e51..28ebe08 100644 --- a/audiodevices.h +++ b/audiodevices.h @@ -7,6 +7,7 @@ #else #include #include +#include #endif #include @@ -20,22 +21,25 @@ #include "wfviewtypes.h" + struct audioDevice { audioDevice(QString name, int deviceInt, bool isDefault) : name(name), deviceInt(deviceInt), isDefault(isDefault) {}; #if (QT_VERSION < QT_VERSION_CHECK(6,0,0)) audioDevice(QString name, const QAudioDeviceInfo deviceInfo, QString realm, bool isDefault) : name(name), deviceInfo(deviceInfo), realm(realm), isDefault(isDefault) {}; #else - audioDevice(QString name, const QAudioDevice deviceInfo, QString realm, bool isDefault) : name(name), deviceInfo(deviceInfo), realm(realm), isDefault(isDefault) {}; + audioDevice(QString name, QAudioDevice deviceInfo, QString realm, bool isDefault) : name(name), deviceInfo(deviceInfo), realm(realm), isDefault(isDefault) {}; #endif QString name; int deviceInt; + #if (QT_VERSION < QT_VERSION_CHECK(6,0,0)) const QAudioDeviceInfo deviceInfo; #else - const QAudioDevice deviceInfo; + QAudioDevice deviceInfo; #endif + QString realm; bool isDefault; }; @@ -84,6 +88,8 @@ signals: void updated(); protected: private: + + audioType system; QFontMetrics fm; QString defaultInputDeviceName; @@ -94,6 +100,9 @@ private: QList outputs; int numCharsIn = 0; int numCharsOut = 0; + + + }; #endif \ No newline at end of file diff --git a/wfmain.ui b/wfmain.ui index 975bc54..65972b3 100644 --- a/wfmain.ui +++ b/wfmain.ui @@ -1798,6 +1798,7 @@ DejaVu Sans Mono 14 + 75 true @@ -2684,23 +2685,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - @@ -2729,6 +2713,23 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + @@ -2764,48 +2765,25 @@ - + - Audio System + Audio Output - - - - QT Audio - - - - - PortAudio - - - - - RT Audio - - - - - - - - Qt::Horizontal - - + + 120 16777215 - + + Audio Output Selector + + - - - - @@ -2842,14 +2820,10 @@ - - - - - + - Audio Output + Audio System @@ -5335,6 +5309,7 @@ + 50 false diff --git a/wfview.vcxproj b/wfview.vcxproj index 9c38b47..5007670 100644 --- a/wfview.vcxproj +++ b/wfview.vcxproj @@ -142,8 +142,8 @@ ui_%(Filename).h - cmd /c copy /y ..\qcustomplot\x64\qcustomplot2.dll release\ -cmd /c copy /y ..\portaudio\msvc\x64\Release\portaudio_x64.dll release\ + cmd /c copy /y ..\qcustomplot\x64\qcustomplot2.dll wfview-release\ +cmd /c copy /y ..\portaudio\msvc\x64\Release\portaudio_x64.dll wfview-release\ Copy DLL Files @@ -191,8 +191,8 @@ cmd /c copy /y ..\portaudio\msvc\x64\Release\portaudio_x64.dll release\_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;WFVIEW_VERSION=\"1.4\";BUILD_WFVIEW;__WINDOWS_WASAPI__;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_USE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"4574e2b\";HOST=\"wfview.org\";UNAME=\"build\";QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) - cmd /c copy /y ..\qcustomplot\x64\qcustomplotd2.dll debug -cmd /c copy /y ..\portaudio\msvc\x64\Debug\portaudio_x64.dll debug + cmd /c copy /y ..\qcustomplot\x64\qcustomplotd2.dll wfview-debug +cmd /c copy /y ..\portaudio\msvc\x64\Debug\portaudio_x64.dll wfview-debug Copy DLL files @@ -222,9 +222,11 @@ cmd /c copy /y ..\portaudio\msvc\x64\Debug\portaudio_x64.dll debug + + @@ -252,6 +254,8 @@ cmd /c copy /y ..\portaudio\msvc\x64\Debug\portaudio_x64.dll debug + + @@ -329,6 +333,7 @@ cmd /c copy /y ..\portaudio\msvc\x64\Debug\portaudio_x64.dll debug + diff --git a/wfview.vcxproj.filters b/wfview.vcxproj.filters index 57c7f9e..5e0407c 100644 --- a/wfview.vcxproj.filters +++ b/wfview.vcxproj.filters @@ -137,6 +137,12 @@ Source Files + + Source Files + + + Source Files + @@ -272,6 +278,9 @@ Form Files + + Form Files + @@ -411,5 +420,11 @@ Header Files + + Header Files + + + Header Files + \ No newline at end of file diff --git a/wfview.vcxproj.user b/wfview.vcxproj.user index 8b00255..d10202f 100644 --- a/wfview.vcxproj.user +++ b/wfview.vcxproj.user @@ -18,7 +18,8 @@ WindowsLocalDebugger NativeOnly - + + 2022-08-22T10:47:36.6935363Z @@ -27,7 +28,7 @@ 2022-08-21T18:58:23.4329764Z - 2022-08-22T19:43:39.8544189Z + 2022-12-29T15:52:43.8635901Z 2022-08-22T10:47:49.1255783Z @@ -36,6 +37,6 @@ 2022-08-20T19:06:43.4553894Z - 2022-08-22T19:43:40.1498727Z + 2022-12-29T15:52:44.2967804Z \ No newline at end of file