Skip to content

Commit ef5b0e9

Browse files
committed
refactor(audio): replace Win32 waveOut/waveIn with QAudioSink (cross-platform)
Replace the Windows-only WaveOutWriter (waveOut API) and WaveInReader (waveIn API) with cross-platform Qt6 equivalents so WFM demod works on Windows, macOS, and Linux without platform guards in CMake. Changes: - WaveOutWriter: rewritten using QAudioSink; device selected by QAudioDevice::id() (persistent opaque string) instead of a human-readable name fragment - WaveInReader: removed — the VITA-49 DaxIqModel::iqSamplesReady path is cross-platform and already works; the Win32 DAX waveIn path is no longer needed - WfmDemodulator: simplified to use only the VITA-49 IQ path; updated all debug output to qCDebug(lcAudio) - WfmDeviceDialog: rewritten using QMediaDevices::audioOutputs() and QAudioDevice::id() — works on all platforms - WfmSettings: new header-only settings class following constitution Principle V (nested JSON under 'WFM' key); migrates the legacy flat 'WfmAudioDevice' AppSettings key on first access - CMakeLists: WFM sources moved back to unconditional CORE_SOURCES / GUI_SOURCES — no WIN32 guard needed - MainWindow: resolveAudioDevice() updated to use WfmSettings API
1 parent e7bcb25 commit ef5b0e9

11 files changed

Lines changed: 303 additions & 609 deletions

CMakeLists.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ set(CORE_SOURCES
577577
src/core/SleepInhibitor.cpp
578578
src/core/MemoryCsvCompat.cpp
579579
src/core/MemoryRecallPolicy.cpp
580+
src/core/WfmDemodulator.cpp
581+
src/core/WaveOutWriter.cpp
580582
src/core/tnc/AetherAx25LibmodemShim.cpp
581583
src/core/tnc/Ax25FrameFormatter.cpp
582584
src/core/tnc/Ax25.cpp
@@ -634,6 +636,7 @@ set(GUI_SOURCES
634636
src/gui/MainWindow.cpp
635637
src/gui/AgcCalibrationDialog.cpp
636638
src/gui/AudioDeviceChangeDialog.cpp
639+
src/gui/WfmDeviceDialog.cpp
637640
src/gui/ConnectionPanel.cpp
638641
src/gui/ClientDisconnectDialog.cpp
639642
src/gui/ConnectedStationsDialog.cpp
@@ -951,16 +954,6 @@ endif()
951954

952955
qt_add_resources(RESOURCES resources/resources.qrc)
953956

954-
if(WIN32)
955-
list(APPEND CORE_SOURCES
956-
src/core/WfmDemodulator.cpp
957-
src/core/WaveOutWriter.cpp
958-
src/core/WaveInReader.cpp
959-
)
960-
list(APPEND GUI_SOURCES
961-
src/gui/WfmDeviceDialog.cpp
962-
)
963-
endif()
964957
add_executable(AetherSDR ${ALL_SOURCES} ${RNNOISE_SOURCES} ${GGMORSE_SOURCES} ${RADE_SOURCES} ${BNR_SOURCES} ${SPECBLEACH_SOURCES} ${RESOURCES} ${DFNR_RESOURCES})
965958

966959
if (USE_SYSTEM_ZLIB)

src/core/WaveInReader.cpp

Lines changed: 0 additions & 145 deletions
This file was deleted.

src/core/WaveInReader.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)