Commit Graph

88 Commits

Author SHA1 Message Date
Extremesecrecy a207aa0b63 Update JackServerSettingsDialog.tsx
Trying again + Fire & Forget.
2025-07-27 14:01:50 -07:00
Extremesecrecy d46f77bb61 Update JackServerSettingsDialog.tsx
Persistence change so that we can actually go on with OK
2025-07-27 13:51:42 -07:00
Extremesecrecy 70ba1b7fe1 Update JackServerSettingsDialog.tsx
More time on trying to make sure that Ok behaves correctly.
2025-07-27 13:30:45 -07:00
Extremesecrecy c82c465620 Update JackServerSettingsDialog.tsx
Added an explicit reset for the dialog’s close guard when the dialog mounts or reopens, preventing saved settings from reverting after pressing OK

Modified the close handler to skip reverting settings whenever the dialog was closed via the OK path
2025-07-27 13:05:18 -07:00
Extremesecrecy 13a8b47658 Update JackServerSettingsDialog.tsx
On close modified to have an ignore.
2025-07-27 12:48:57 -07:00
Extremesecrecy 3576f1c7cf handling with ease
Wrote api to manage events easier and easier to parse. Added dummy when releasing devices.
2025-07-27 11:58:33 -07:00
Extremesecrecy 42c03a9c19 Update JackServerSettingsDialog.tsx
Simplified code to one function instead of having the same code twice. Making sure close event does not revert a second time.
2025-07-27 11:35:52 -07:00
Extremesecrecy 10a2ae96b8 Warning Fix, added comments 2
Warning handler was causing the ok not to function correctly.
2025-07-27 10:36:42 -07:00
Extremesecrecy ec520cdbf5 Ok handler
Set settings before closing the page.
2025-07-27 08:46:25 -07:00
Extremesecrecy 8b4bd76be1 Persist
Pressing OK in the JACK server dialog now clears the stored original settings so the close handler doesn’t revert them, ensuring the new devices remain active
2025-07-27 07:43:01 -07:00
Extremesecrecy 871f4c2d58 Persist fix
Revert any applied settings by restoring the
persisted configuration and re-applying it.
2025-07-26 14:49:02 -07:00
Extremesecrecy c7bcc7c240 Reverting waits
Waits are still overlapping. Will discuss with Robin for advice on how he wants to manage them. My attempt stopped the over lap but broke the loading.
2025-07-26 12:56:30 -07:00
Extremesecrecy c9e5e97b00 persistence again
Clean start worked but now the persisted is not working. Patching persistence.
2025-07-26 10:01:24 -07:00
Extremesecrecy 389ba70540 Settings sometime don't start fix
Apply immediately so the audio driver is
restarted with the chosen devices before
saving the settings.
2025-07-25 20:46:11 -07:00
Extremesecrecy c33c69899c Adding persist - T2
Adding model persist so that the apply can be used for testing. Previous did not  persist as intented.
2025-07-25 19:58:43 -07:00
Extremesecrecy bce2e68ee3 Update JackServerSettingsDialog.tsx
Apply button does not save settings, it is only used for testing. As per Robin on git. Ok button will save settings only. If the box is closed/cancelled, the settings revert to what they were before.
2025-07-25 18:42:50 -07:00
Extremesecrecy ccaadf1e38 Retain settings
When reopening the JACK server settings dialog, the selected settings now remain intact. The dialog only applies device defaults after ALSA information has loaded, preserving current values otherwise
2025-07-25 17:08:23 -07:00
Extremesecrecy 703e517baf RAM usage +
Introduced a new field to track memory usage in the backend status structure, allowing the server to report memory utilization as a percentage

Implemented a Linux-specific routine to read /proc/meminfo and calculate the memory usage percentage, and integrated this into the status query

Added serialization for the memory usage field so it is included in JSON responses

Updated the frontend class to deserialize and display memory usage alongside CPU usage on the status readout
2025-07-25 14:24:10 -07:00
Extremesecrecy 82e923486c Update JackServerSettingsDialog.tsx
No background on labels.
2025-07-25 13:33:35 -07:00
Extremesecrecy 1f8ee4bfd6 Update JackServerSettingsDialog.tsx
Only the capture/playback device information to display on Jack config file.
2025-07-25 13:07:04 -07:00
Extremesecrecy 5b09df0a0a Update PiPedalModel.tsx
vite/src/pipedal/PiPedalModel.tsx - For this file only!

Expected outcome is that the server may (or may not) reboot). The purpose of the catch handler (which would happen in the case of a socket disconnect) is to make sure that an error or abort does not get reported, since it is expected.

Changes to wifi configuration, where the handler code MUST NOT PROPAGATE AN EXCEPTION.

(1) just leave this function to rot in its shameful state of decay, but do NOT relay the error.
(2) Write the audio properties (specifically) without waiting for a response. The settings are propagated to other clients (and ourselves) with a on...changed notifications from the server, so there's no actual response from the server required.

Audio properties specified:
        const audioProps = [
            "http://two-play.com/plugins/toob-player#audioFile",
            "http://two-play.com/plugins/toob-player#loop",
            "http://two-play.com/plugins/toob-player#seek",
        ];
2025-07-25 12:52:58 -07:00
Extremesecrecy 1f6efd4da3 Update JackServerSettingsDialog.tsx
Changed the Apply action so that pressing “Apply” immediately sets and loads the selected devices, allowing the status display to confirm whether the configuration worked
2025-07-25 12:27:16 -07:00
Extremesecrecy b3534e0d1e Trying to follow the rest of the ui look
Added “whiteSpace: 'nowrap'” to input label styles so audio device labels remain on a single line without awkward wrapping

Removed the “Please select all audio settings.” warning and now show only the device status in the dialog footer.
2025-07-25 11:46:11 -07:00
Extremesecrecy 7ae6647b62 Device Info on configuration
Display device info only on configuration.
2025-07-25 11:19:45 -07:00
Extremesecrecy 56d66ef7db Tabs and check script and dependency
Removed tabs (tabs to spaces). Remove the check_deps.sh. removed libwebsocketpp-dev from dependencies. BTW, this is in cmake.yml.
2025-07-24 20:31:40 -07:00
Extremesecrecy 2fa19f6462 Update JackServerSettingsDialog.tsx
Not used...keep forgetting warning will stop build. Removing.
2025-07-24 19:44:02 -07:00
Extremesecrecy 874d859916 Email Changes - Backwards Compatibility
Introduce legacy alsaDevice_ field in JackServerSettings to preserve compatibility with older configs. Include this field in serialization to allow old config files to load. Add migration logic in Storage::GetJackServerSettings to copy the legacy device value to new separate input/output fields and clear the legacy value after migration.

Update frontend validation so that device selections are only validated when the user presses OK. Improve buffer selection logic to prioritize 32×4, then other x4, x3, or x2 options, falling back to 64×3 if none match.

Use standard MUI styling for device selectors. Labels stay above the field and no longer animate. Dropdown labels now use background padding to prevent underline overlap.

Add a compactWidth flag to adjust layout on narrow screens. Stack device selectors vertically in compact mode while keeping the refresh button on the right. Refreshing ALSA info sets unknown device IDs to a blank value.

Add real-time status updates with a polling timer. Separate Apply and OK handlers so settings can be tested without closing the dialog. Add an Apply button alongside Cancel and OK.

Update the UI summary logic to show “Input → Output” when devices differ and “Not selected” when config is incomplete. Filter out internal devices like HDMI and bcm2835 from the device list.

Retain the legacy alsaDevice_ field in the JSON for backward compatibility, with helper accessors and documentation for legacy constructor behavior. Update latency text calculation to show when sample rate and buffer size are defined, even if the config is invalid.

Removed libsdl2-dev from dependency checking and dependencies.
2025-07-24 19:27:39 -07:00
Extremesecrecy 53282d11c9 Update JackServerSettingsDialog.tsx
only clear the ALSA device fields when you uncheck the box,

still refresh the device list (via requestAlsaInfo()) but

preserve the checkbox state (so it doesn’t get recalculated back to true)
2025-07-24 12:25:09 -07:00
Extremesecrecy de7b905ca2 Update JackServerSettingsDialog.tsx
Import warning caused build stop. Commenting it out.

Removed an unused import from the top of the JackServerSettingsDialog component to resolve the TypeScript build error
2025-07-24 11:07:18 -07:00
Extremesecrecy 77342f95fe Update AlsaDeviceInfo.tsx
Assumed the id was a number. Changed the interface ID to string
2025-07-24 10:47:11 -07:00
Extremesecrecy c112553766 Handling devices upon selection change and full screen on dialog to accommodate phone size.
Added responsive logic using ResizeResponsiveComponent so the device configuration dialog can switch to full screen on displays narrower than 420 px or shorter than 700 px

When toggling “use same device,” the previous device choices are cleared and device information is refreshed to reset the dropdowns

Buffer and sample‑rate options now remain disabled until the appropriate number of devices has been selected
2025-07-24 10:40:42 -07:00
Extremesecrecy 8fd86901e5 Testing trying to keep serialization through interface
More variables called through app, reversed to original. keep serialization through interface.
2025-07-24 10:32:11 -07:00
Extremesecrecy d02fe63cce UI Console Errors and Git Errors Fixes, + recommendations (Take 2, careful with const vs var)
UI Console Errors and Git Errors Fixes, + recommendations
Converted several variables to constants and removed unused function parameters in the AboutDialog component, addressing lint warnings

Introduced strict JSON interfaces in AlsaDeviceInfo to replace untyped “any” parameters and ensured returned arrays use constants

Simplified styling callbacks and defined props more strictly in App, while using constants for URL parsing

Updated the WithStyles helper to accept unknown argument lists and return types rather than “any”

Added a workflow step so CI runs npm run lint -- --fix inside the vite directory

Testing
2025-07-24 10:03:57 -07:00
Extremesecrecy b82958d8e6 Revert "UI Console Errors and Git Errors Fixes, + recommendations"
This reverts commit 1e9cd5eb13.
2025-07-24 09:40:20 -07:00
Extremesecrecy 1e9cd5eb13 UI Console Errors and Git Errors Fixes, + recommendations
Converted several variables to constants and removed unused function parameters in the AboutDialog component, addressing lint warnings

Introduced strict JSON interfaces in AlsaDeviceInfo to replace untyped “any” parameters and ensured returned arrays use constants

Simplified styling callbacks and defined props more strictly in App, while using constants for URL parsing

Updated the WithStyles helper to accept unknown argument lists and return types rather than “any”

Added a workflow step so CI runs npm run lint -- --fix inside the vite directory

Testing
2025-07-24 08:11:00 -07:00
Extremesecrecy 43cc758d18 Revise device configuration logic and settings
The ALSA device scanner no longer inserts default sample rates when it cannot read them, preventing invalid frequency choices

Jack server settings now accept independent input and output devices during construction

The latency test utility was updated to handle separate input and output device parameters and display them accordingly

The help text for the latency tool documents the new usage with optional output device specification

Device lists in the configuration dialog are sorted to prefer devices supporting capture and playback, then USB devices, while refresh preserves existing selections
2025-07-24 07:45:02 -07:00
Extremesecrecy 798a8c8708 Update PiPedalModel.tsx
Updated the error handling logic in PiPedalModel’s WiFi Direct configuration. The promise now rejects when the server call fails instead of resolving silently
2025-07-23 23:09:44 -07:00
Extremesecrecy f72533ec0c Update PiPedalModel.tsx
Modified the “setWifiDirectConfigSettings” method to resolve the promise only on success and reject on errors, matching the pattern used by “setWifiConfigSettings.”
2025-07-23 22:52:46 -07:00
Extremesecrecy 85c1e46350 Handle Empty SampleRates Cont
Prevents crashes when input/output devices report no sample rates by defaulting to the current rate or 48 kHz if needed

Provides a fallback option in the UI so the selected rate is visible even when the device list is empty
2025-07-23 22:14:31 -07:00
Extremesecrecy 69eeeca3fc Handle Empty Samplerates
Prevents crashes when input/output devices report no sample rates by defaulting to the current rate or 48 kHz if needed

Provides a fallback option in the UI so the selected rate is visible even when the device list is empty
2025-07-23 22:12:38 -07:00
Extremesecrecy d98c5c1ae0 Update JackServerSettingsDialog.tsx
Added a user-facing error hint in the audio configuration dialog that prompts users to select all audio settings when the OK button is disabled
2025-07-23 21:32:54 -07:00
Extremesecrecy 3c20668b07 Update JackServerSettingsDialog.tsx
Allowed the device selector row in JackServerSettingsDialog to wrap items with a small gap so input and output dropdowns no longer collide
2025-07-23 20:50:10 -07:00
Extremesecrecy 90b050bca4 Update JackServerSettingsDialog.tsx
Enhanced “same device” configuration to validate that the selected input device also supports playback, falling back to a device with both capabilities if necessary

Updated the “Use same device” change handler so it automatically picks a valid device that supports both capture and playback when enabled

Modified the input device label to display “Device” when using the same device for input and output, maintaining consistency with the configuration
2025-07-23 20:23:02 -07:00
Extremesecrecy ad22489be7 Same Device Con't
When “Use same device” is enabled, changing that setting now ensures the input device also supports playback, switching to the first bidirectional device if necessary

The input device dropdown hides devices lacking playback capability whenever the same-device option is active

The device change handlers now call “applyAlsaDevices” with the latest settings to recalculate latency and validation, ensuring UI state matches valid ALSA configurations

“applyAlsaDevices” accepts an optional same-device flag so callers can specify when input and output devices should be treated as identica
2025-07-23 19:37:11 -07:00
Extremesecrecy c8a80e5aaa Same Device Support
Updated the input and output device change handlers so new settings are validated through applyAlsaDevices, ensuring latency and OK status are refreshed
Added a new “useSameDevice” flag in the Jack server settings dialog state to track whether input and output devices are locked together

Initialized the flag based on whether the current configuration uses the same input and output device

Updated device handlers to mirror the input device into the output device when the toggle is enabled

Inserted a checkbox labeled “Use same device for input/output” into the dialog UI and hid the output selector when this option is active
2025-07-23 19:08:50 -07:00
ExtremesecrecyOne 6ac8968583 Devices with only I or O Fix
Added new fields to track ALSA device capabilities, letting the application know whether a device supports capture or playback

Updated serialization to include the new flags in the JSON data exchanged with the UI

Modified the dummy driver so test devices always indicate capture and playback support

Adjusted the TypeScript model and dialog to filter device choices based on the new flags, ensuring only valid options appear in selectors
2025-07-23 12:18:19 -07:00
ExtremesecrecyOne fbd925caca Update JackServerSettingsDialog.tsx
Summary

Added imports for the new refresh button in the JACK settings dialog, enabling quick reloading of ALSA devices without closing the dialog

Inserted an IconButton next to the audio device selectors so users can refresh the list on demand
2025-07-23 11:35:22 -07:00
ExtremesecrecyOne c6aec562b0 Update JackServerSettingsDialog.tsx
The dialog now disables the device selectors and shows a “Loading…” placeholder until ALSA devices are available, preventing runtime errors during the initial render
2025-07-23 07:58:23 -07:00
ExtremesecrecyOne 1ca0973833 Fixes to Changes.
Added helper functions to combine and intersect ALSA device capabilities, ensuring validation works across separate input and output devices

Updated buffer handling logic to use both selected devices and compute min/max sizes appropriately

Revised validation to check both ALSA input and output devices when enabling the OK button

Simplified rendering logic to intersect sample rates and buffer options for the chosen devices

AlsaDriver single device err calls fixed.

Added guidance on using USB audio interfaces or Raspberry Pi audio HATs and choosing separate ALSA input and output devices during setup

Clarified that the Audio Device Settings dialog allows independent configuration of input and output devices, with updated instructions for selecting audio channels
2025-07-22 17:51:33 -07:00
ExtremesecrecyOne d8043d2041 Separate IO
Initial separation of input and output devices. Assisted by our super friend ChatGpt.
2025-07-22 16:20:30 -07:00