Commit Graph

46 Commits (fb000c043c7d0e0c5404b260cad67f30354fc6e5)

Author SHA1 Message Date
Mooneer Salem fb000c043c Merge branch 'v2.0-dev' into ms-log-library 2024-11-23 08:09:15 -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 697809a6d1 Remove spurious newlines from log messages. 2024-11-23 00:16:00 -08:00
Mooneer Salem 8190587737 Switch printf/fprintf to log_* calls. 2024-11-23 00:14:56 -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 68c5d340f6 Adjust audio level based on configured volume. 2024-07-12 18:10:55 -07:00
Mooneer Salem 3ef2125753 Better handle high sample rate audio devices. 2024-01-22 23:34:46 -08:00
Mooneer Salem 5e640962e6 Prevent creation of filters if not enabled. 2023-12-28 16:05:44 -08:00
Mooneer Salem 5b56d23b66 Tweak LinkStep to avoid buffer overruns/monitor audio stuttering. 2023-08-16 23:18:25 -07:00
Mooneer Salem 13170403e6 Eliminate feedback noise. 2023-08-13 21:02:53 -07:00
Mooneer Salem 5187baea09 Fix issue preventing recording of VK files. 2023-08-13 14:05:02 -07:00
Mooneer Salem 2507287970 Monitor VK only during TX, not record. 2023-08-12 15:36:24 -07:00
Mooneer Salem 0e709d79dd Fix issue preventing monitoring from working when not in Analog mode. 2023-08-12 11:56:08 -07:00
Mooneer Salem 5df9b2c262 Add linkages to allow audio to be monitored. 2023-08-11 00:22:08 -07:00
Mooneer Salem 6e720c28a3 Allow VK recording without triggering PTT. 2023-08-09 07:26:54 -07:00
Mooneer Salem 85a1871dae Get basic implementation of VK recording woking. 2023-08-05 10:38:36 -07:00
Mooneer Salem 408ff94b70 Include TX audio in the audio being recorded from the radio. 2023-08-04 22:36:39 -07:00
Mooneer Salem c8144c998f Remove references to 2400A. 2023-07-16 16:41:14 -07:00
Mooneer Salem c3a82ec9cc Move all remaining config items out of MainApp. 2023-07-02 17:58:56 -07:00
Mooneer Salem 54ccef513c Move all remaining filter settings to separate config. 2023-07-02 12:03:44 -07:00
Mooneer Salem 796e554069 Remove SRC object we weren't actually using. 2023-05-26 20:10:23 -07:00
Mooneer Salem 40dcb92bb4 Fix thread leak on shutdown. 2023-05-26 19:53:26 -07:00
Mooneer Salem 966a76ea0b We should always be uisng output sample rate after TX step. 2022-10-29 23:25:05 -07:00
Mooneer Salem 2142199a37 Restructure sample scaling formulas for readability. 2022-10-29 22:55:15 -07:00
Mooneer Salem 0ae089551b Merge branch 'ms-audio-path' into ms-2020-experiment 2022-06-21 20:58:55 -07:00
Mooneer Salem e0b5dfd263 Use pipeline for RX path. 2022-06-21 20:26:52 -07:00
Mooneer Salem a80b259af8 Use ParallelStep for TX. 2022-06-21 00:32:50 -07:00
Mooneer Salem b378445c47 Merge branch 'ms-700c-hang' into ms-2020-experiment 2022-05-14 16:26:33 -07:00
Mooneer Salem 519c9960a8 Rearrange ordering of shutdown actions to prevent hangs on slower machines. 2022-05-07 18:17:34 -07:00
Mooneer Salem 2c11502b56 Merge branch 'ms-audio-path' into ms-2020-experiment 2022-04-25 00:09:10 -07:00
Mooneer Salem cdbba415d2 Clear TX fifos when not transmitting. 2022-04-24 20:07:03 -07:00
Mooneer Salem 114549c2c7 Buffer TX step's audio through a FIFO. 2022-04-07 08:44:54 -07:00
Mooneer Salem 7664071daa Fix bugs preventing proper recording of radio audio at the correct sample rate. 2022-04-02 14:07:23 -07:00
Mooneer Salem aa0a90355f Suppress equalizer execution if not actually enabled. 2022-04-01 23:59:55 -07:00
Mooneer Salem 5ba5ff2283 Remove unused resampler objects previously used in the original code. 2022-04-01 00:30:28 -07:00
Mooneer Salem 3b7cefc06d Eliminate unnecessary output resampling steps for TapStep. 2022-03-29 23:09:39 -07:00
Mooneer Salem 1de00c7151 Fix bug where audio sounds wharbling with Speex enabled. 2022-03-29 22:05:00 -07:00
Mooneer Salem 1d741e4c70 Remove remaining sample rate global variables from TxRxThread. 2022-03-24 00:40:39 -07:00
Mooneer Salem f2e888ac0b Use sample rate as per device instead of global variables' valuess. 2022-03-24 00:27:50 -07:00
Mooneer Salem 65f6e77698 Resolve issue preventing use of an analog device with a different sample rate from the digital one. 2022-03-24 00:18:10 -07:00
Mooneer Salem 1b950eb126 Create ExclusiveAccessStep to ensure we lock needed mutexes around play and record. 2022-03-21 23:25:56 -07:00
Mooneer Salem d4abaa0838 Lock ResampleForPlotStep to FS to avoid AddressSanitizer read errors. 2022-03-21 23:09:27 -07:00
Mooneer Salem f894053a87 Use pipeline for RX as well. 2022-03-20 17:30:53 -07:00
Mooneer Salem 302f407279 Warning cleanup. 2022-03-20 14:44:45 -07:00
Mooneer Salem d99453e0fd WIP effort to switch TX thread over to pipeline. 2022-03-20 10:32:29 -07:00
Mooneer Salem 014362a475 Move paCallbackData and TxRxThread to pipeline library. 2022-03-19 17:25:41 -07:00