Commit Graph

5963 Commits (master)

Author SHA1 Message Date
Mooneer Salem d51ae29cef Merge branch 'v2.0-dev' into merge-2.0-with-master 2025-05-28 07:52:31 -07:00
Mooneer Salem 1a6efb8b3e latest user manual PDF 2025-05-28 14:51:12 +00:00
Mooneer Salem 0bcfaabfd4
Remove pre-PTT interrogation of frequency/mode. (#898)
* Remove pre-PTT interrogation of frequency/mode.

* Add PR #898 to changelog.
2025-05-28 07:47:49 -07:00
Mooneer Salem 0567d1dd5b
Fix issue preventing filter from properly changing in the FreeDV Reporter window. (#897) 2025-05-28 07:40:52 -07:00
Mooneer Salem e56e258036 Added additional content to changelog. 2025-05-27 17:02:56 -07:00
Mooneer Salem 9345a56f69 Update changelog and version tags in preparation for 2.0.0 release. 2025-05-27 16:52:28 -07:00
Mooneer Salem aedcc1f3cb
Additional cleanup of RT-unsafe logic. (#894) 2025-05-27 09:42:13 -07:00
Mooneer Salem 284ff94750 latest user manual PDF 2025-05-26 19:32:24 +00: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 12d549f8cd
Harmonize resizing hacks across codebase. (#884) 2025-05-15 21:41:00 -07:00
Mooneer Salem 4343183ce2
Base RX highlighting on user time, not server time. (#886) 2025-05-15 21:40:13 -07:00
Mooneer Salem a432c661ab
Add incrementing counter to log entries. (#887) 2025-05-15 20:10:59 -07:00
Mooneer Salem 9d93b7ec32 latest user manual PDF 2025-05-15 14:09:43 +00:00
Mooneer Salem d405ee770c
Show /dev/tty.* devices on macOS. (#883)
* Show /dev/tty.* devices on macOS.

* Add PR #883 to changelog.
2025-05-15 07:07:05 -07:00
Mooneer Salem 943ebab428
Avoid crash on stop if hamlib is somehow not able to initialize the radio (#882)
* Avoid crash on stop if hamlib is somehow not able to initialize the radio.

* Need to use PTT type of RIGMICDATA in order for 'CAT via Data port' option to actually work.
2025-05-14 11:13:00 -07:00
Mooneer Salem 6b2debfdb4
Second attempt at fixing Windows Start/Stop crashes (#881)
* Use shared setHelperRealTime in internal WASAPI threads.

* Capture this instead of all by reference in internal WASAPI threads.

* Clean up refcounts of COM objects.

* Missed release of default audio device.

* Event handle needs to be closed on stop().

* Fix cross-compile definitions to allow asan to be used in the first place.

* Make sure TX/RX thread stops before audio devices do.
2025-05-13 17:03:42 -07:00
Mooneer Salem 3084177af3
FreeDV Reporter: Force re-sorting on user connect. (#878)
* FreeDV Reporter: Force re-sorting on user connect.

* Try unconditionally resorting on every pass through the timer.

* Bump up RX input FIFO to 30s. Yes, I know this is pretty excessive.

* Remove sortRequired_ since we're not using it anymore.

* Default to sorting by frequency.
2025-05-13 16:43:08 -07:00
Mooneer Salem e2a1bba010 latest user manual PDF 2025-05-11 21:47:17 +00:00
Mooneer Salem 3730fcd55a
Hamlib: improve behavior with Icom rigs, serial port PTT (#875)
* Re-attempt Hamlib connection without timeouts if failed.

* Add Hamlib error message to log.

* Remove timeouts.

* Only set ptt_pathname if using RTS or DTR.

* Various Hamlib fixes adapted from WSJT-X.

* Warning cleanup.

* Update changelog.

* Reset PTT type back to RIG to avoid issues when switching between RTS/DTR and CAT.

* Add support for CAT PTT using the Data port (vs. Mic).

* Update user manual.
2025-05-11 14:44:58 -07:00
Mooneer Salem 81b03651f8
WASAPI: Adjust shutdown to avoid crash on repeated start/stop. (#879)
* Adjust shutdown to avoid crash on repeated start/stop.

* Resolve Windows compile error.
2025-05-11 11:04:47 -07:00
Mooneer Salem 8477b27a56
Remove octave/octave-signal from README. (#874)
* Remove octave/octave-signal from README.

* Remove Octave from macOS dependencies.
2025-05-09 00:29:16 -07:00
Mooneer Salem 1cb1214db6
Fix additional GTK assertion on startup for FreeDV Reporter. (#873)
* Suppress hide/show_self until after fully connected.

* Added additional debug logging in case previous change doesn't work.

* Revert "Suppress hide/show_self until after fully connected."

This reverts commit d98fd8f179.

* Add additional logging.

* Update IsContainer definition based on wxWidgets samples.

* Remove added debugging.
2025-05-08 08:42:18 -07:00
Mooneer Salem a34ef56394 latest user manual PDF 2025-05-07 21:22:52 +00: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 7b7e3bd34a latest user manual PDF 2025-05-01 19:31:59 +00:00
Mooneer Salem 2a290d809a
Enable color emojis in the FreeDV Reporter window (#861)
* WIP patch to wxWidgets to enable color emojis on Windows.

* WIP rewrite of FreeDV Reporter window to use wxDataViewCtrl.

* Apparently we need to associate the model before adding columns.

* Force render the Msg column using Direct2D, causing emojis to display in color.

* Move ReportMessageRenderer to a separate file.

* Only use ReportMessageRenderer on Windows. Also, make sure we don't show ellipsis unless for the Msg field.

* Bring back preservation of sort column.

* Bring back preservation of Msg column width.

* Support Request QSY functionality again.

* Fix rendering issues on macOS.

* Fix Windows compiler errors.

* Fix rendering issue on Windows from previous commits.

* Use correct selection foreground color when rendering with Direct2D.

* Set minimum column widths.

* Column headings should be centered.

* Batch up item changed notifications during refresh.

* Reenable clipboard and tooltip support.

* Ellipsize message text on Windows.

* Allow tooltips to at least show when clicking on a row.

* Have emojis display in color in tooltips as well.

* Add warning message when not building wxWidgets ourselves.

* Only notify of adding new connection if visible.

* Add additional checks around ItemAdded/ItemDeleted.

* Add/remove items individually every refresh to avoid intermittent Linux crashes.

* Defer memory deallocation until after the UI actually removes the item from view.

* Another attempt at fixing the crash.

* Need to validate pointer in GetAttr() too.

* Undo previous changes, try locking allReporterData_ instead.

* Fix Hamlib compiler failure due to changes in 4.6.

* Add some missed locks.

* Replace locks with assertions that we're on the main thread.

* Probably don't need to defer delete.

* Add additional checking around query methods.

* Warning cleanup.

* Make sure items are unselected before deleting.

* Unselect selected user once QSY request has been sent.

* Force a complete redraw when rows go away.

* Try another way of forcing a redraw.

* We only need to call Cleared() once per row.

* Improve CPU usage.

* Aggressively clear selected users when not actively interacting with them.

* Sort by connect time if no columns are selected for sorting.

* PAIn thread should be RT too (missed from previous PR).

* Force a re-sort on connect.

* Resort on every update from the server.

* Sort fix that hopefully doesn't crash.

* Some minor additional changes.

* Disable PAIn thread and just rely on the normal PulseAudio callbacks for passing audio in and out.

* Make re-sorting happen only once a second.

* Try putting mutexes around all data access.

* Increase RLIMIT_RTTIME just in case.

* Add missed locks.

* RT limit was set too high.

* Sleep for less time than latency if possible.

* Fix crash in TapStep while stopping.

* Defer FreeDV Reporter initialization on startup to make sure GUI is up beforehand.

* Try again to get RTKit to work in the GH environment.

* Try capping maxlength to avoid RX FIFO full errors.

* Increase max buffer size due to overrun errors.

* Default maxlength for output devices to prevent overruns.

* Try bringing back PAin thread. WIP

* Add missed PulseAudio locking.

* Remove more missed mallocs from RT path.

* Remove unneeded code from PulseAudio logic.

* Tab cleanup.

* Increase RX FIFO size.

* Force sleep if we take much longer than expected (avoids kill by rtkit).

* Forgot to check in file.

* Fix compiler error for real.

* Fix issue causing occasionally being unable to get the mic input on macOS.

* Add timeout for EOO in case we lose input devices.

* Add additional protection to prevent the OS from killing the app.

* macOS: get device names an alternate way to avoid empty names for certain devices.

* Make RX plots more reliable when pipewire sends multiple seconds of RX audio at once.

* Oops, used wrong comparison for EOO timeout.

* Catch SIGXCPU in case we exceed RT limits.

* Prevent RX processing from occurring if there's no space in the output FIFO.

* Apparently I was setting the soft and hard rlimits to be the same.

* Lower soft RT limit to 10ms.

* Disable RT scheduling on Linux.

* Added additional protection against server-caused race condition.

* Defer add to table until after we get connection successful message.

* Add missed lock on connect successful message.

* Add missed visibility check.

* Fix issue on Linux.

* Add additional logging to help diagnose duplicate callsign issue.

* Downgrade additional logging to debug/verbose only.

* Fix bug where incorrect SNR was being reported for RADE signals after EOO received.

* Back out previous change buffering rows until fully connected as it doesn't work properly on Windows.

* Fix right-click menu regression.

* Fix issue preventing column sorting on Windows.

* Upgrade wxWidgets to 3.2.8.

* Right-click should not select items.
2025-05-01 12:29:38 -07:00
Peter B Marks b9f041ad28
Add octave as a dependency for macOS build (#870)
* Add octave as a dependency for macOS build

* Add Octave to Linux required packages as well.

---------

Co-authored-by: Mooneer Salem <mooneer@gmail.com>
2025-04-27 01:49:10 -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 439e54035f
Request real-time priority from the operating system for audio pipeline (#866)
* Bound requested frames between both min and max.

* Request real-time scheduling for pipeline threads (currently macOS-only).

* Ensure pipeline threads never execute at the same time as audio threads.

* macOS: ask for 5ms audio blocks.

* Temporarily re-enable stress test.

* Suppress codespell for .mm files.

* Swap times/buffer sizes.

* Fix compiler error.

* Go back to previous frame size and time.

* Re-disable stress test.

* Try adjusting time quantum.

* Move audio priority handling to audio layer.

* Set helper thread to real-time on Windows.

* Temporarily disable audio workgroup code.

* Disable periodicity in macOS RT request

* Forgot to define variable.

* Only allow a max of 50% CPU time for audio helpers.

* More tuning of the duty cycle.

* Make sure we sleep some amount of time every time through the loop.

* Go back to smaller time quantum.

* Another quantum tweak.

* Increase audio sample block size to 20ms.

* Use 2.5ms for audio block time.

* Try increasing FIFO sizes for RX.

* Oops, forgot to comment out the / 1000 too.

* Get faster turnaround for macOS GH builds.

* Revert FIFO changes.

* Add additional debugging.

* Fix compiler error.

* Fix typo.

* Use semaphores to notify TX/RX worker threads.

* Try dividing duty cycle by 2 to avoid starvation.

* Reenable audio workgroups.

* No point in having parallel threads if only one mode is active.

* Ensure that ParallelStep gets added to the audio workgroup too.

* Anything for GUI consumption shouldn't be in the RT path.

* Go back to 10ms audio blocks to see if reporting tests can more reliably pass.

* Fix issue causing audio to not work on certain Macs.

* Support real-time threading on Linux when using PulseAudio/pipewire.

* Fix misspelling.

* dbus needs to be installed in the environment.

* macOS: try a smaller block size again.

* Revert "macOS: try a smaller block size again."

This reverts commit 1d21ad6934.

* Try architecture-specific audio block times.

* rtkit itself also needs to be installed in the environment.

* Revert ordering changes to macOS CI builds.

* GH user needs to be added to rtkit group.

* Implement semaphores on Windows.

* Don't exit the render/capture threads unless requested by higher level code.

* Don't take address of a pointer.

* macOS: set thread QoS for RT threads.

* Move RADE RX/TX memory allocations out of real-time path.

* Moving additional memory allocations outside of RT context.

* Move all remaining allocations in pipeline outside of RT except for legacy FreeDV modes.

* Longer audio block times don't seem to be making a difference.

* Move legacy mode memory allocations out of RT context.

* Prevent unbounded mutex locks inside pipeline.

* Windows: fallback to a simple sleep if we can't lock the semaphore.

* Increase maximum wait time to match what Windows returns for buffer size.

* PulseAudio: fallback to simple sleep if we can't wait on semaphore.

* Prevent unbounded locking in TapStep.
2025-04-23 00:18:24 -07:00
Mooneer Salem 6bf0f311b1
Warning cleanup of 2.0 code branch (#867)
* Initial warning cleanup.

* Fix issue causing audio to not work on certain Macs.

* Fix compiler error.

* Fix remaining MacAudioDevice warnings.

* Fix more warnings.

* Fix Hamlib compiler failure due to changes in 4.6.

* Fix websocketpp related warnings on Linux.

* Fix issue causing waterfall rendering issues.

* Fix additional warnings when compiling on Linux.
2025-04-21 13:07:27 -07:00
Mooneer Salem a73c6d3e5e
Fix crash on macOS when using devices capable of high sample rates. (#860) 2025-04-13 02:08:58 -07:00
Mooneer Salem 2a426440ea Merge branch 'master' into v2.0-dev 2025-04-13 00:09:19 -07:00
dforsi c239106b57
Update build dependency for Linux workflow (#858)
* Update build dependency for Linux workflow

* Make codespell ignore another word
2025-04-13 00:08:02 -07:00
dforsi 0010177d1a
Fix typos (#859)
* Fix typos

* Add PR #859 to changelog and credit @dforsi

---------

Co-authored-by: Mooneer Salem <mooneer@gmail.com>
2025-04-13 00:03: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 149d37230b
Move to using native audio on macOS and Windows (#847)
* Initial implementation of macOS audio handling using native APIs.

* Fix minor calculation issue in Easy Setup when generating sine waves.

* Fix spelling error.

* Fix issue causing distorted output audio.

* Refactor audio device info retrieval to a separate method.

* Get channel information for discovered macOS audio devices.

* Add support for retrieving default audio devices.

* Try using AVAudioSinkNode for getting mic/RX audio.

* Use AVAudioSourceNode for output side too.

* Fix compiler error.

* Set minimum macOS version to 10.15 due to PyTorch and new audio code requiring it.

* Disable universal build in GH action to make it run a bit faster.

* Additionally use Homebrew packages as deps instead of building own for GH action.

* Don't build hamlib if BUILD_DEPS is 0.

* Use matrix to test macOS build on both x86_64 and ARM64.

* Experiment: always sleep for 10ms every time through the TX/RX loop.

* Temporarily enable longer tests to make sure previous pass wasn't a fluke.

* Remove logic not available in 10.15.

* Revert "Experiment: always sleep for 10ms every time through the TX/RX loop."

This reverts commit 6019c9a522.

* Need to query valid sample rates from Core Audio.

* Validate provided sample rate and channel data when creating audio object.

* Set device sample rate to user-configured option.

* Sample rates could be different between input and output.

* Revert "Temporarily enable longer tests to make sure previous pass wasn't a fluke."

This reverts commit f90c4cd081.

* Remove now unused code.

* Harmonize native vs. PortAudio config across build scripts.

* Zero out audio by default to prevent buzzing.

* Update README to use new environment variable for audio driver control.

* Add COM wrapper class around ThreadedObject. Prerequisite for WASAPI audio support.

* Disable OLE 1.0 per Windows documentation.

* WIP WASPI device enumeration.

* Forgot to check in some changes.

* Fix compiler errors.

* Avoid deadlock during sample rate list retrieval.

* s/WASPI/WASAPI/g

* WIP WASAPIAudioDevice design.

* Full WASAPIAudioDevice implementation.

* Increase priority of audio tasks to prevent dropouts.

* Add missed nullptr initialization.

* Increase buffer time to 40ms

* Fix issue where non-English device names were getting corrupted.

* Add additional logging.

* Need to create macOS audio device name just like with Windows.

* Update README to document new config options.
2025-03-31 22:35:35 -07:00
Mooneer Salem c53ed0406d
Clear disconnect cancellation after finishing disconnect. (#854) 2025-03-30 10:09:20 -07:00
Mooneer Salem 8cebc55c43
We should be logging getaddrinfo failures as warn, not debug. (#853) 2025-03-28 17:25:09 -07:00
Mooneer Salem 83886d4d73
Fix crash on FreeDV Reporter connection failure (#849)
* Fix issue causing crash if FreeDV Reporter can't be accessed.

* Abort pending connections on FreeDV Reporter hostname change.
2025-03-27 07:43:50 -07:00
Mooneer Salem 84a58fcb12 latest user manual PDF 2025-03-26 23:31:08 +00:00
Mooneer Salem 9d618d4719
Report "unk" for mode on Hamlib disconnect (#851)
* Add missed Hamlib call to disconnect event.

* Clean up duplicated freq/mode event code.

* Clean up duplicated connect/disconnect logic.

* Add PR #851 to changelog.

* Fix typo

* Fix compiler errors for real.
2025-03-26 16:28:34 -07:00
Mooneer Salem ed24f932ec
Zero out invalid socket ID on disconnect to avoid repeatedly erroring on read/write. (#848) 2025-03-21 16:32:08 -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 febf654424 latest user manual PDF 2025-03-11 05:38:25 +00: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 9ae1f9d235 latest user manual PDF 2025-03-10 16:18:21 +00:00
Mooneer Salem af10e3c4db
Shorten PulseAudio/pipewire app name. (#843)
* Shorten PulseAudio/pipewire app name.

* Add PR #843 to changelog.
2025-03-10 09:15:05 -07:00
Mooneer Salem d14ba38ed6
Port ezDV FreeDV Reporter implementation to freedv-gui (#836)
* Embed sioclient source code into FreeDV codebase.

* Exclude 3rdparty from spellcheck.

* Revert "Embed sioclient source code into FreeDV codebase."

This reverts commit 2021118544.

* Embed ZIP file with sioclient code instead of individual files.

* Generate tarball on Linux as CMake behaves weird with a macOS-created ZIP file.

* Add json and websocketpp source files.

* Add ThreadedTimer (prerequisite for own socket.io implementation).

* Adapt ezDV implementation of sioclient.

* Update FreeDVReporter to use our SocketIoClient.

* Fix bugs preventing connection to FreeDV Reporter server.

* Read all data available every 50ms.

* Fix bug preventing hide/show from working properly.

* Remove sioclient tarball and build logic.

* Fix Linux build issue.

* Work around exception bug on object destruction.

* Fix Windows build failure.

* Ensure that connection is actually closed if we stop being in contact with the server.

* Fix additional segfault on exit.

* Sockets on Windows aren't actually fully POSIX.

* Use ulog for websocketpp logging.

* Update comments in recently added files.

* Additional logging cleanup.

* Show IP address that failed connection.

* Reduce websocketpp buffer size to match what's used in our read logic.

* Fix spelling error.

* Fix issue with corrupted IP addresses being logged.

* Add additional logic to make absolutely sure we're done with DNS.

* Make sure whichIndex is valid once we complete DNS.

* Widen Mode field on bottom of main window.
2025-03-06 12:37:41 -08:00
Mooneer Salem 501a6834f2 latest user manual PDF 2025-03-06 08:42:53 +00:00