From a01a140d659380a94e6f9a2c76c47519f09a468d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Feb 2026 15:43:33 +0000 Subject: [PATCH 1/3] Initial plan From 766a9763776487ffea7908c0ac36b62627e98e37 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Feb 2026 15:46:46 +0000 Subject: [PATCH 2/3] Fix PipeWire audio SPA_AUDIO_INFO_RAW_INIT usage Fixed incorrect usage of SPA_AUDIO_INFO_RAW_INIT macro in both audio_capture_pipewire.c and audio_playback_pipewire.c. The macro should be used inline as an argument to spa_format_audio_raw_build() rather than as a variable initialization. This aligns with PipeWire's official examples and prevents potential build errors with different compiler settings or PipeWire versions. Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com> --- src/audio_capture_pipewire.c | 13 ++++++------- src/audio_playback_pipewire.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/audio_capture_pipewire.c b/src/audio_capture_pipewire.c index 1ea0112..092dcdb 100644 --- a/src/audio_capture_pipewire.c +++ b/src/audio_capture_pipewire.c @@ -162,13 +162,12 @@ int audio_capture_init_pipewire(rootstream_ctx_t *ctx) { struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer)); const struct spa_pod *params[1]; - struct spa_audio_info_raw info = SPA_AUDIO_INFO_RAW_INIT( - .format = SPA_AUDIO_FORMAT_S16, - .channels = pw->channels, - .rate = pw->sample_rate - ); - - params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, &info); + params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, + &SPA_AUDIO_INFO_RAW_INIT( + .format = SPA_AUDIO_FORMAT_S16, + .channels = pw->channels, + .rate = pw->sample_rate + )); /* Connect stream for capture */ if (pw_stream_connect( diff --git a/src/audio_playback_pipewire.c b/src/audio_playback_pipewire.c index 6ff588a..c13ac14 100644 --- a/src/audio_playback_pipewire.c +++ b/src/audio_playback_pipewire.c @@ -110,13 +110,12 @@ int audio_playback_init_pipewire(rootstream_ctx_t *ctx) { struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer)); const struct spa_pod *params[1]; - struct spa_audio_info_raw info = SPA_AUDIO_INFO_RAW_INIT( - .format = SPA_AUDIO_FORMAT_S16, - .channels = pw->channels, - .rate = pw->sample_rate - ); - - params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, &info); + params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, + &SPA_AUDIO_INFO_RAW_INIT( + .format = SPA_AUDIO_FORMAT_S16, + .channels = pw->channels, + .rate = pw->sample_rate + )); /* Connect stream for playback */ if (pw_stream_connect( From 3ae0cf70fc6a8c283026970fb4426059e46622a5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Feb 2026 15:47:40 +0000 Subject: [PATCH 3/3] Add Phase 25.1.1 bugfix summary documentation Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com> --- PHASE25.1.1_BUGFIX_SUMMARY.md | 90 +++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 PHASE25.1.1_BUGFIX_SUMMARY.md diff --git a/PHASE25.1.1_BUGFIX_SUMMARY.md b/PHASE25.1.1_BUGFIX_SUMMARY.md new file mode 100644 index 0000000..d8ff937 --- /dev/null +++ b/PHASE25.1.1_BUGFIX_SUMMARY.md @@ -0,0 +1,90 @@ +# Phase 25.1.1 - PipeWire Build Error Fixes + +## Overview + +Phase 25.1.1 is a bugfix release that addresses pre-existing build errors in the PipeWire audio backend files. These issues were identified during Phase 25.1 implementation but were deferred as they were unrelated to the recording system features. + +## Implementation Status: ✅ COMPLETE + +### Fixed Issues + +#### 1. SPA_AUDIO_INFO_RAW_INIT Macro Usage ✅ + +**Files Modified:** +- `src/audio_capture_pipewire.c` +- `src/audio_playback_pipewire.c` + +**Problem:** +The `SPA_AUDIO_INFO_RAW_INIT` macro was being used incorrectly as a variable initializer, which could cause build errors with certain compiler settings or PipeWire versions. + +**Before (Incorrect):** +```c +struct spa_audio_info_raw info = SPA_AUDIO_INFO_RAW_INIT( + .format = SPA_AUDIO_FORMAT_S16, + .channels = pw->channels, + .rate = pw->sample_rate +); +params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, &info); +``` + +**After (Correct):** +```c +params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, + &SPA_AUDIO_INFO_RAW_INIT( + .format = SPA_AUDIO_FORMAT_S16, + .channels = pw->channels, + .rate = pw->sample_rate + )); +``` + +**Rationale:** +- Aligns with PipeWire's official examples and best practices +- Avoids potential issues with C99 designated initializer handling +- Ensures compatibility across different compiler versions and flags +- Prevents macro expansion issues that could occur with variable assignment + +### Benefits + +1. **Improved Compatibility:** Code now matches PipeWire's recommended usage patterns +2. **Cleaner Code:** Eliminates intermediate variable that was only used once +3. **Better Maintainability:** Follows upstream conventions, making future updates easier +4. **Fewer Build Errors:** Prevents potential compilation issues on different systems + +## Technical Details + +### Changes Summary +- **Lines Changed:** 12 lines modified across 2 files +- **Net Change:** -2 lines (removed intermediate variable declarations) +- **Impact:** Zero functional impact, purely structural improvement + +### Testing +- ✅ Syntax validation with GCC (strict warnings enabled) +- ✅ No functional changes to audio capture/playback logic +- ✅ Maintains all existing error handling paths +- ✅ Preserves all existing functionality + +## References + +### Related Documentation +- [PipeWire audio-capture.c example](https://github.com/PipeWire/pipewire/blob/master/src/examples/audio-capture.c) +- [PipeWire spa_audio_info_raw API](https://docs.pipewire.org/structspa__audio__info__raw.html) +- Phase 25.1 Implementation Summary (recording system features) + +### Historical Context +These build errors were noted during Phase 25 development: +- Mentioned in `PHASE25_IMPLEMENTATION_REPORT.md` (Line 124) +- Deferred to separate PR as they were unrelated to recording features +- Now resolved as part of version 25.1.1 + +## Deliverables + +1. ✅ Fixed source code files +2. ✅ Git commits with descriptive messages +3. ✅ This documentation file +4. ✅ Updated PR description + +--- + +**Implementation Date:** February 14, 2026 +**Status:** COMPLETE AND READY FOR MERGE +**Version:** 25.1.1