Commit Graph

12 Commits (master)

Author SHA1 Message Date
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 099a010a6e
macOS: Better handle when audio devices go away (#871)
* Automatically switch to new default audio device if the system loses existing one.

* Display error if non-default devices go away.

* Add device name to existing error strings.

* Add handler at engine level for device list changes. Does nothing yet.

* Prevent accidental deadlock when enqueuing functions onto ThreadedObject.

* Disable OnDeviceListChange logic; only handle active device disconnects.

* Attempt to restart devices if they stop unexpectedly.

* Defer stop to make sure remove handler runs first.

* Experiment: disable Python GC in RADE code to see if macOS pass rates improve.

* Fix possible deadlock issue in FreeDV Reporter code.

* Split out audio latency and PTT response time in logs per email discussion.

* Improve reliability of original PR logic by listening for AVAudioEngineConfigurationChangeNotification instead.

* Fix compiler error in GH environment.

* Make sure we join the new workgroup if the device ID changes.

* Remove unused code.

* Revert unnecessary ThreadedObject change.

* Remove extra whitespace.

* Revert ThreadedObject for real.

* Log audio underflows on macOS.

* Remove unneeded include.

* Get stuff off the audio thread that shouldn't be there.

* Make sure ThreadedObject doesn't hang.

* See if we can avoid FreeDV Reporter window crash on Windows.

* Tweak ThreadedObject event loop so we can execute more than one function between sleeps.

* Main window UI fixes:

1. Make FreeDV Mode indicator re-center itself every time it changes.
2. Add additional space for radio mode at bottom.

* Revert TapStep changes as we're better off not locking at all.

* Fix FreeDV Reporter tracking crash for real.

* Don't allow columns in FreeDV Reporter window to shrink.

* Warning cleanup.

* Try creating tiny column at end to fix Linux/Windows formatting problem.

* Remove minimum width logic as it didn't work.

* Sort equal items by connect time to keep rows stable.

* Fix deadlocks and crashes in the Audio Options window.

* Actually prevent same rows from moving around in FreeDV Reporter window.

* Deselect FreeDV Reporter row after filter change completes.

* Defer sending initial station info to FreeDV Reporter server until fully connected.

* Make sure we're not accessing invalid memory when getting audio device latency.

* Make sure PTT button is in the correct state when pushed.

* Fix From Mic plot rendering bug.

* Update changelog.
2025-05-07 14:19:58 -07:00
Mooneer Salem 2efcc7f125
Display message box in Windows installer prior to installing Python. (#869)
* Display message box in Windows installer prior to installing Python.

* Fix typo.
2025-04-26 19:31:17 -07:00
Mooneer Salem 6d8f7e5b5d
Fix build issues on macOS (#845)
* Fix fargan_config.h issue when not building universal binaries.

* Add additional dependencies to force RADE to be built first.

* Try matrix build of macOS to verify both universal and non-universal builds.

* Fix syntax error.

* Update conditionals to actually evaluate properly.

* Need single quotes for matrix comparison.

* Bring back original permissions workaround for some builds.

* Oops, copied the wrong permissions lines from previous commit.

* Revert GH action changes.
2025-03-12 09:10:14 -07:00
Mooneer Salem c1cc52e42f
Increase max SNR in the UI to 40 dB. (#817) 2025-01-17 16:51:49 -08:00
Mooneer Salem 630764778c
Integrate SNR reporting from latest RADE. (#797)
* Integrate SNR reporting from latest RADE.

* Show -- for SNR when using RADE and not in sync.

* Suppress SNR display when not in sync for legacy modes.
2025-01-08 23:42:16 -08:00
Mooneer Salem 3eff68ed64
Ensure that __pycache__ folders are cleaned up by the Windows uninstaller. (#791)
* Ensure that __pycache__ folders are cleaned up by the Windows uninstaller.

* Fix syntax errors.

* Might as well include changes to macOS GH action to stash result.
2024-12-31 23:59:33 -08:00
Mooneer Salem 7d88772dd9
Fix stuttering during EOO TX. (#780)
* Prevent EOO from being repeatedly sent during TX stop.

* Make sure we don't accidentally overflow the output FIFO when transmitting EOO.

* Add additional logging to verify EOO behavior.

* Fix issue preventing EOO from being sent on voice keyer completion.

* Scale EOO the same as the primary waveform.

* Remove #ifdef code per PR comment.

* Use main branch for RADE.
2024-12-14 09:41:54 -08:00
Mooneer Salem 44b33f84ec
Adopt C port of core RADE code (#774)
* WIP checkin so we can build in Windows environment.

* Use version of opus built by RADE to avoid Linux compiler errors.

* Bring back fargan_config.h generation.
2024-11-24 08:32:25 -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 36566a7f22
Install Visual Studio Redistributable. (#771)
* Install Visual Studio Redistributable.

* Fix errors in initial commit.
2024-11-18 23:16:28 -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