Commit Graph

21 Commits (5bd401b03a71d24f1d667f9ff885e3785db80ab2)

Author SHA1 Message Date
Mooneer Salem 5bd401b03a
Fix compiler errors when using wxWidgets 3.0. (#914)
* Fix compiler errors when using wxWidgets 3.0.

* Add GH action to make sure we can compile on Ubuntu 22.04.

* Fix package name.

* Add PR #914 to changelog.

* Ensure only one build per branch happens at a time.
2025-06-05 12:36:24 -07:00
Mooneer Salem 150b2cde7d
Improve macOS test reliability (#904)
* Return to 20ms block sizes on macOS to improve test reliability.

* Use Windows 2022 in test environment.

Don't want to be fighting Windows problems too.

* Don't want to be fighting gfortran either.

* Try caching Homebrew package install to decrease compile/test time for macOS.

* See if we can make RADE reporting a bit more reliable in the GH environment.
2025-05-31 19:00:45 -07:00
Mooneer Salem 30c9e5b9c6
Remove 800XA, 700C, 2020 and 2020B. (#889)
* Remove 800XA, 700C, 2020 and 2020B from UI,

* Remove additional 700C references in UI.

* Remove 2020/AVX detection logic from codebase.

* Remove LPCNet from build scripts.

* Add PR #889 to changelog.

* Forgot to remove LPCNet from Windows installer generation.

* Generate Release build for GH workflows.

* Disable PSK Reporter reporting during test execution as invalid callsigns are used.

* Build type was being overwritten.

* Missed mutex removal.

* Temporarily use Instruments to trace macOS CI execution.

* Minor update.

* Use 2 minute window in xctrace to actually capture wanted events.

* Disable xctrace execution but keep in tests just in case.

* Hide main window during tests to prevent GUI from interfering.

* Experiment: set infifo2 max length to 30 seconds

* Oops, forgot to remove division from previous commit.

* Deallocation of PulseAudio stream should occur while mainloop is locked.

* Revert "Hide main window during tests to prevent GUI from interfering."

This reverts commit 69689bb927.

* Based on online code snippets nullptr for neg is fine.

* Clear PYTHONHOME if set on the user's system (Windows/macOS only).

* Bring back locking in TxRxThread just in case.

* Remove unneeded backslash.

* Revert "Bring back locking in TxRxThread just in case."

This reverts commit fc6a9f8797.

* Manually back out the changes instead of using git checkout.

* Use shared_ptr for LinkStep.

* Try removing the TX mode change mutex again.

* Try moving actual codec activity out of RT context.

* Fix compiler error.

* Fix issue preventing legacy modes from transmitting.

* Another attempt at preventing RX dropouts.

* Try putting mode TX into separate threads again.

* Only limit output samples if input samples were provided.

* Put codec RX back into RT context.

* Put TX on RT context.

* Remove unused code.

* Deallocation should occur only in the destructor.

* Fix Windows spectrum plot formatting issues.

* Prevent buffer overflow during TX/RX processing.

* Bring FRAME_DURATION back down to 10ms.

* We want to feed samples into the RADE/FreeDV TX/RX FIFOs regardless of whether there's room in the output.

* ParallelStep should only feed FRAME_DURATION ms worth of samples at a time.

* Sleep fallback should track FRAME_DURATION.

* Don't execute the parallel steps if there isn't enough room in the output FIFO.

* We really can only inject a portion of EOO samples at a time.

* Queue EOO as a single unit to ensure it gets transmitted as a unit.

* Allow ParallelStep to provide up to 4x the number of input samples as output.

* Back to processing 20ms frames.

* Run GH Linux tests using asan enabled.

* Suppress Python related memory leaks and Hamlib related invalid memory accesses.

* Forgot suppressions= in test execution.

* Add more leak suppressions based on GH output.

* Resolve memory leaks.

* Fix broken RadeTextTest.

* Additional suppressions from GH.

* Go back to processing TxNumSpeechSamples every TX cycle.

* Revert "Go back to processing TxNumSpeechSamples every TX cycle."

This reverts commit abe816d00b.

* Fix 1600 mode dropouts.

* Make TX single-threaded again.

* Revert back to last working pipeline logic (for fullduplex_* anyway).

* Revert most EOO behavior.

* Run AddressSanitizer tests separately as they interfere with real time audio.

* Need to start Xvfb etc. before asan tests.

* Only a subset of tests need to run with asan enabled.

* Fix issue causing PTT input not to work.

* Maybe we don't need to restart servers after all.

* Try using rtkit to ask for high priority instead of RT.

* Clear FIFOs a different way.

* Windows: determine minimum number of audio channels supported.
2025-05-26 12:29:47 -07:00
Mooneer Salem 919bba2c14
Further audio dropout improvements (#876)
* Adjust constants based on Instruments analysis.

* Update comments.

* Try reading only FRAME_DURATION at a time during TX.

* Speex step doesn't need to be locked.

* Use shared pointers instead of locking during EqualizerStep.

* Move file read out of the RT context.

* Remove file I/O from RT context for RecordStep too.

* Try requesting 10ms blocks from Windows.

* Allow all GH tests to run.

* Revert back to 20ms frames.

* Minor tweak to Easy Setup window formatting.

* Revert "Revert back to 20ms frames."

This reverts commit b67313cdef.

* Update freedv-ctest-fullduplex.conf.tmpl

Disable multiple RX for testing.

* Turn off multiple RX for reporting tests as well.

* Force single threaded if only one step is available.

* Revert changes to freedv-ctest-fullduplex.conf.tmpl.

* Revert changes to freedv-ctest-reporting.conf.tmpl.

* Need to wake up all threads whenever we get a block of audio.

* Fix compiler errors.

* Revert previous changes as they didn't help.

* Refactor ParallelStep to remove usage of locks.

* Fix compiler errors and warnings.

* Fix issue preventing EOO from being sent.

* Another attempt at fixing the test failures.

* Use semaphores to wake up ParallelStep threads on receipt of new audio data.

* Fix compiler errors.

* Forgot to wake up helper threads.

* Helper threads should wait until ended or until there's data.

* Fix compiler error.

* Increase fifo sizes for FreeDV TX and RX steps.

* macOS: add protection in case semaphore wasn't created.

* Prevent waterfall from clearing itself when RX mode changes.

* Add logic to read in any data that may have come in during processing.

* GitHub Actions: run all Windows tests even if one or more fail.

* Revert "Add logic to read in any data that may have come in during processing."

This reverts commit 11ce99bb6a.

* Meter out only a little bit of data at a time.

* Revert "Meter out only a little bit of data at a time."

This reverts commit 35e81d6ce5.

* Use 20ms blocks instead of 10ms.

* Revert "Use 20ms blocks instead of 10ms."

This reverts commit 1ec6fb308a.

* Update FRAME_DURATION instead.

* Only process entire TX blocks at a time.

* Set sRGB color space for all open windows.

* Change version tag to rc to reflect release candidate status.

* Revert waveform FIFO changes from previous PR.

* libsamplerate needs to be built with optimizations on macOS and Windows.

* Fix Windows build failure.

* Update LLVM MinGW in Windows CI build to match version used for packaging.

* Test: use RADE main to see if Python GC actually matters.
2025-05-19 11:56:05 -07:00
Mooneer Salem 7cdb9e8a7d
Improve EOO TX/RX reliability (#855)
* Create FIFOs with correct sizes to reduce EOO time.

* Try using configured fifo size for all FIFOs.

* Use correct variable names when definining FIFO sizes.

* Update wxWidgets to 3.2.7 to see if that fixes the build failure.

* Use Ubuntu 24.04 for Windows build to match Linux.

* Patch libsamplerate to avoid GH action failure.

* Need to remove 3.1 from samplerate-cmake.patch

* Fix issue causing cmake to hang if being rerun.

* Temporarily use wxWidgets master as latest Xcode can't build 3.2.7.

* Add support for rig control during RADE EOO ctests.

* Try adding a bit of time to see if it'll decode.

* Fix GH action failure.

* Fix Windows build failure.

* Use same delay code as other existing similar logic.

* Add 20ms delay in mock rigctld to better match behavior with actual hardware.

* Fix Windows build issue for real.

* Fix samplerate patch issue.

* Include wxWidgets manifest code since 3.3 will soon require it.

* Use 3.2 branch as we can build on macOS now in that branch.

* Add IAudioDevice function to allow retrieval of device latency.

* Try shrinking the number of samples FreeDVInterface returns for RADE.

* Add missed get() call in PortAudio logic.

* We really shouldn't need to add txIn latency.

* We need to see the logs from when TX happens during ctest.

* Explicitly disable power savings for audio (macOS).

* Allow partial reads from TX output FIFO.

* First pass at calculating latency for WASAPI.

* Try IO frame size of 1024 to improve pass rate of GH Actions.

* Initial implementation of RADE reporting test on Windows.

* Remove unneeded flag from previously added script.

* Fix various issues with PS script.

* Revert "Try IO frame size of 1024 to improve pass rate of GH Actions."

This reverts commit 1161d9505d.

* Use FDV output, not mock rigctl output, for comparison.

* Use GetStreamLatency() instead.

* Add logging to help determine why WASAPI latency is incorrect.

* Need GetDevicePeriod as well for fully accurate latency measurements.

* Buffer size is the minimum bound on latency. Or at least it seems like it would be, anyway.

* Guarantee that we have universal macOS binary even if tests fail.

* Also take into account PTT response time (i.e. for SDRs).

* Only need to add half of the rig response time for good results.

* Forgot implementation of getRigResponseTimeMicroseconds() for OmniRig.

* Prevent negative zero SNRs from appearing in GUI.

* Try smallest buffer size possible for macOS audio.

* Fix macOS compiler error.

* (Windows) Use event based triggering to provide audio to/from FreeDV.

* Divide by number of channels to get actual latency on macOS.

* Increase minimum frame size to 128 on macOS.

* Oops, types need to be the same.

* Fix deadlock in Windows audio from previous commits.

* Try 256 buffer size on macOS.

* Use minimum of 40ms latency on macOS and Windows.

* No need for the samplerate patch anymore.

* Fix comments.
2025-04-11 19:33:33 -07:00
Mooneer Salem bbba124a9c
Update build scripts to use optimal number of parallel builds. (#842)
* Update build scripts to use optimal number of parallel builds.

* Update Windows GH action similarly to other build scripts.

* Add PR #842 to changelog.

* Need -j6 for Windows for some reason.

* Increase Windows test timeouts.

* -j doesn't actually limit the number of parallel builds.
2025-03-10 22:35:54 -07:00
Mooneer Salem 941afb8036
Fix bug causing hangs in non-RADE mode at end of TX. (#808)
* Fix bug causing hangs in non-RADE mode at end of TX.

* Fix GH action issue with Windows.
2025-01-15 08:25:11 -08:00
Mooneer Salem e86bc18213
Rename RADE to RADEV1. (#788)
* Rename RADE to RADEV1.

* Fix GH action failures.
2024-12-15 01:41:54 -08:00
Mooneer Salem 8b8755332b
Clean up how logging works. (#773)
* Begin cleanup of logging.

* Fix Windows build failure.

* Bump up minimum macOS version to 10.13 to make compiler happy about fmemopen().

* Switch printf/fprintf to log_* calls.

* Remove spurious newlines from log messages.

* Remove g_verbose from codebase.

* Ensure Hamlib logs via ulog.

* Convert cerr/cout to ulog.

* Fix unit test and Linux compiler errors.

* Strip newlines from end of hamlib log messages.

* It would help if we actually printed the non-newline version of the log message.

* Actually fix Windows compiler errors.

* Replace additional printfs with log_* after merge from main.

* Add locking around logging to make sure we don't lose any.

* Try disabling color to get Windows tests working again.

* Use regular wine instead of wine-staging.

* Revert "Use regular wine instead of wine-staging."

This reverts commit 88bf4ef7c2.

* Add missed changelog entries.

* Poll for xvfb to come up.

* Try framebuffer dir instead.

* Fix typo.

* Try 24 bit color.

* Try xvfb-run instead.

* Fix xvfb-run command.

* Try the screen arguments again.

* Try wine-devel instead as it might be more stable.

* Update cmake-windows.yml

* Lock log mutex before running RADE RX.

This is to avoid test output loss on Windows.

* Log to stderr and not stdout.

* Update RADEReceiveStep.cpp
2024-11-23 18:54:21 -08:00
Mooneer Salem 0d40130f2e
Add tests to verify lack of sync loss in RX (#761)
* Add logic for automatically running RX/TX tests.

* Add GH action to load loopback audio driver.

* Add ctest configuration file.

* Try loading modules after installing packages.

* Add additional required packages.

* Add automated test script.

* Temporarily disable GH action changes.

* Have RX take 60 seconds as well.

* Ubuntu upgrade broke /bin/sh.

* Fix issue preventing no zero message from printing.

* Print sync status once per second and validate no resyncs.

* Fix spelling error.

* Switch to RADE main.

* Another attempt at enabling aloop in the GH action.

* Use _ instead of - for module name.

* Use pacmd to create virtual sound devices instead.

* Check sync state every 100ms instead of every 1s.

* Fix issue preventing sync changes from making it to the log.

* Add full duplex test.

* Add full duplex tests to CMakeLists.

* Generate sine wave for TX.

* Update GH action to allow new ctests to run.

* Add debugging for UT.

* pipewire-pulse is needed to actually use PipeWire.

* Install suggested packages to get additional required commands.

* Can't use --install-suggests, so explicitly mention packages.

* Enable pipewire service.

* Fix call to helper Python script.

* Show status of pipewire prior to running tests.

* Remove status display from GH action.

* Use module-loopback to simulate TX plugged into RX.

* Try explicitly starting pipewire.

* Use strict 20ms cadence for TX/RX thread instead of relying on the audio subsystem.

* Need to install wireplumber as well.

* Update regular expression in ctest as sync change message isn't printed unless there's a problem.

* Add RADE to ctests.

* RADE ctest pass wasn't actually a pass.

* Need to explicitly check for LINUX for PulseAudio based ctests.

* Reenable PortAudio build.

* Invert test criteria.

* Show pipewire status just before thye test run.

* List sink info prior to each test.

* Make sure virtual devices aren't suspended.

* Need to have the suspension disable code in another file.

* Actually, installing pulseaudio isn't a good idea.

* Need a window manager for things to refresh properly.

* Display wireplumber info after FDV start.

* Add additional sleep to guarantee that FreeDV is listening when wireplumber status is printed.

* Add pw-top for additional info.

* dbus needs to be running for pipewire to work.

* Need to wait a bit for Xvfb to become available.

* Get additional pipewire logs prior to UT run.

* Install/run rtkit too.

* Attempt to get pipewire logs after test execution.

* Looks like we still need to start pipewire manually.

* Further increase pipewire debugging.

* Too much debugging output before.

* Upgrade packages first before installing new ones.

* We weren't actually running 24.04 on GH.

* Adjust packages due to using 24.04.

* Suppress spellcheck issue.

* Disable pipewire debugging.

* Test changes to PulseAudioDevice to improve dropouts.

* Update tests to reflect 1 resync per 120s proposed threshold.

* Disable additional debugging output.

* Allow override of test audio devices from the command line.

* Enable ctests on macOS.

* getSync() isn't thread safe, causing false UT failures.

* Install virtual audio devices in CI environment for macOS.

* Use script to build drivers instead.

* Oops, forgot to remove some code first.

* Adjust permissions of script.

* Make tests work on Linux again with loopback devices.

* Attempt change to make virtual audio devices actually build.

* Try building on x86 macOS.

* Fix quote escape issues.

* More quote escape issues.

* Forgot missed folder change.

* Enable mirrored virtual audio devices.

* Fix incorrect device names in ctest execution.

* Need to append '2ch' to the other device names too.

* Clear sync when transmitting.

* Grant microphone access to FreeDV.

* Need to back out one of the changes due to voice keyer problems.

* Attempt to fix CI failures.

* Take screenshot of macOS CI environment for debugging.

* Let's try running the script separately to get a screenshot.

* Screenshot was in the wrong place.

* Need to grant access to provisioner for microphone.

* Alternate way of granting permissions.

* Oops, remove call to tccutil.

* Per PLT meeting, we shouldn't drop sync at all.

* Shorten test time to 60s.

* More tweaks to make sure that the devices are correct on Linux.

* Disable screen capture.

* Additional fixes to resolve script problems on macOS.

* I don't think previous PulseAudio changes made anything better.

* Improve dropouts when using PulseAudio/pipewire.

* Revert "Improve dropouts when using PulseAudio/pipewire."

This reverts commit f16c27f4d3.

* Have stream write callback get audio data from higher level code.

* Add PowerShell script for Windows testing.

* Move ctest files into a separate location for organization purposes.

* Add parameters for PowerShell test script.

* Add help text for the script.

* Update conf file path due to previous commits.

* Fix syntax errors in script.

* Experiment: Test Windows installer on GH action.

* Try actually running full duplex test inside Windows.

* Add 5 seconds to allow Xvfb to fully come up.

* Update other actions to use latest checkout.

* Need VS command prompt.

* Add additional debugging.

* Maybe we need to throw an exception to make the GH action fail.

* List devices another way.

* Add yet more debugging.

* Fix audio devices.

* Try with 700D to at least make sure we're on the right track.

* Fix GH action.

* Fix syntax errors.

* Try installing VAC instead as FreeDV is crashing with Scream.

* Fix syntax error.

* Try different hardware ID.

* Ignore error code that actually means success.

* Oops, fix syntax error.

* Try earlier version of VAC.

* Fix archive commands.

* Fix path.

* Probably need to start AudioEndpointBuilder too.

* Stop services first.

* Print out any errors that might be getting thrown.

* Revert "Print out any errors that might be getting thrown."

This reverts commit 15e3908c80.

* Disable test GH action for Windows and investigate failure later.

* Reenable Windows testing with new way of debugging.

* Add logging based on clues from Windows event log.

* Revert "Add logging based on clues from Windows event log."

This reverts commit de4f11362e.

* Use procdump to get a crash dump.

* Full dump seems to take a while.

* Run procdump in the background.

* Log audio errors.

* Print device name in error message.

* Make sure message box doesn't display.

* Enable additional PortAudio debugging.

* Add yet more logging.

* Add additional Registry key to ensure FreeDV has microphone permissions.

* Need to add Registry key.

* Add more keys to try to force microphone permission.

* Clean up debugging, add tests for RADE/700E/1600.

* More cleanup.
2024-11-23 08:08:40 -08:00
Mooneer Salem e7f7b35646
Integrate RADE into FreeDV application (#748)
* Include very basic Python install in the FreeDV Windows installer.

* Bump version to 2.0.0 devel.

* Adjust pth file to allow pip to work.

* Create post-install script. Not tied into the installer yet.

* Install needed packages during setup.

* Fix issue preventing uninstall commands from being properly added to the installer.

* Add RADE binaries to installer for initial tests.

* Suppress RADAE/RADE in code spelling check.

* Fix additional compiler errors.

* Fix GitHub actions on Linux and macOS.

* Print API version later on startup so it'll actually show up in the Windows console.

* Enforce minimum 16 kHz sample rate for voice keyer files.

* Disallow sample rates lower than 16000 in audio config.

* Initial support for RX using librade.

* Adjust dependencies in CMake infrastructure to make sure RADE/Opus build before FreeDV code.

* Add GUI for RADE.

* Add forgotten files.

* Add initialize/finalize calls for RADE.

* Add progress text to post-install script.

* Adjust paths based on recent RADE commits.

* Add basic support for RADE TX.

* Output EOO on end of TX.

* Fix error preventing Windows installer from being created without 2020 mode.

* Change working directory to folder containing freedv.exe.

* Remove quotes from messages in post-setup script.

* Fix compiler errors.

* Fix assertion failure in PlaybackStep.

* Fix assertion failure in FreeDVInterface.

* Suppress warnings during post-install.

* Get missed bugfixes from previous PR.

* Test changes to get GH actions working again for Windows.

* Forgot to install WINE in GH action.

* Try win64 instead of win32 for WINE.

* wine32 and not wine64

* Try different way of installing wine.

* Remove packages that don't exist.

* Oops, actually installed Python 3.12.7.

* Use normal Python installer instead of wenv.

* Need to make sure wine runs in console-only.

* Use Wine from Ubuntu.

* Install wine32 too.

* Ignore return value.

* Use xvfb since trying to bypass doesn't work for winecfg.

* s/xvfb/xvfb-run/

* Separate WINE install from Python.

* More tweaks to the GH workflow.

* wine64 instead of wine

* Use WINEARCH when creating env.

* test changes

* Start xvfb separately.

* xvfb -> Xvfb

* Add debugging

* Forgot :

* Make WINE think it's Windows 10.

* Back to using wine-staging.

* Reenable xvfb.

* Fix cmake invocation.

* Integrate BuildOpus changes from RADE.

* Ensure Opus is built for minimum supported FreeDV version.

* Warning cleanup.

* Ensure RADE is actually built as a universal binary.

* Include basic Python into the .app file.

* macOS version now builds. Still need to figure out how to get modules installed.

* Resolve problems preventing proper execution of the macOS binary.

* torchvision isn't necessary.

* Fix reporting so that we report RADE instead of 'unk'.

* Expire devel versions of FreeDV after six months.

* Attenuate RADE TX by 4dB to avoid needing to adjust TX Attenuation dial just for that mode.

* Disable 2020/2020B on all platforms.

* Stop building 32 bit Windows builds.

* Move RADE mode to the top of the mode list.

* Tweak preprocess function for RADE.

* Update Windows Python to 3.12.7.

* Re-disable ARM Windows builds while we figure out how to build it.

* Build Wine in signing environment.

* Update wxWidgets to 3.2.6.

* Workaround time display issue in FreeDV Reporter on macOS.

* Limit number of numpy/OpenBLAS threads due to known issues with their interaction with Python/C++ threading.

* Add additional guarding around Codec2 FIFO calls.

* Split off DMG creation into separate target to save time during development.

* Use dr-reset for initial release.
2024-10-20 18:09:11 -07:00
Mooneer Salem 9cd0c294d5 Bootstrap LPCNet as part of GH action. 2024-04-12 22:49:18 -07:00
Mooneer Salem 32e6906775
Need to limit the number of parallel tasks for GitHub to build okay. 2023-04-09 13:54:47 -07:00
Mooneer Salem 583132d410 Add PR #361 to changelog. 2023-04-09 13:01:32 -07:00
Mooneer Salem cf59da509b Oops, need to add sudo. 2023-04-08 17:58:10 -07:00
Mooneer Salem d32302d1c3 NSIS needs to be installed in the GitHub action. 2023-04-08 17:57:00 -07:00
Mooneer Salem 5dc1a8ccc1 Have GitHub action generate the Windows installer. 2023-04-08 17:37:19 -07:00
Mooneer Salem 6cbccff369 Update Windows build action to use LLVM MinGW instead. 2023-04-08 17:13:12 -07:00
Mooneer Salem 7be885a1df Use correct branch reference for Docker CI build. 2022-07-05 22:43:56 -07:00
Mooneer Salem f23aded56b Rename Linux to Windows in description. 2022-03-24 22:49:11 -07:00
Mooneer Salem 89a5e7012f Remove Mac build, create Windows one. 2022-03-24 22:48:28 -07:00