Skip to content

fix(audio): include <spa/pod/iter.h> for spa_pod_find_prop() - #18

Merged
reionwong merged 1 commit into
cutefishos:mainfrom
wineee:fix/audio-spa-iter
Oct 24, 2026
Merged

reionwong merged 1 commit into
cutefishos:mainfrom
wineee:fix/audio-spa-iter

Conversation

@wineee

@wineee wineee commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

clients/audio/audio_object.cpp calls spa_pod_find_prop() but only includes <spa/pod/parser.h>. Newer pipewire headers no longer pull iter.h in transitively, so the declaration is missing.

Building with GCC 16.2.0 and pipewire 1.4.x fails with:

clients/audio/audio_object.cpp: In function 'const spa_pod_prop* cutefish::audio::AudioObject::getProp(const char*)':
clients/audio/audio_object.cpp:34:34: error: 'spa_pod_find_prop' was not declared in this scope
   34 |     const spa_pod_prop* prop = spa_pod_find_prop(object, nullptr, key);
    |                                  ^~~~~~~~~~~
clients/audio/audio_object.cpp:34:34: note: suggested alternative: 'spa_pod_for_each_prop'

Including <spa/pod/iter.h> explicitly fixes it.

audio_object.cpp calls spa_pod_find_prop() but only includes
<spa/pod/parser.h>, so the declaration is missing and newer
pipewire headers no longer pull iter.h in transitively.

Building with GCC 16.2.0 and pipewire 1.4.x fails with:

    clients/audio/audio_object.cpp: In function 'const spa_pod_prop* cutefish::audio::AudioObject::getProp(const char*)':
    clients/audio/audio_object.cpp:34:34: error: 'spa_pod_find_prop' was not declared in this scope
       34 |     const spa_pod_prop* prop = spa_pod_find_prop(object, nullptr, key);
        |                                  ^~~~~~~~~~~
    clients/audio/audio_object.cpp:34:34: note: suggested alternative: 'spa_pod_for_each_prop'

Include <spa/pod/iter.h> explicitly to get the declaration.
@reionwong

reionwong commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Thanks for the fix! I reproduced the error by building against the pipewire 1.6.0 spa headers, and with this change audio_object.cpp compiles.

clients/audio/tests/fake_audio_device.h has the same problem: it calls spa_pod_find_prop(), spa_pod_copy_array() and spa_pod_get_bool() with only <spa/pod/parser.h>, so -DBUILD_TESTING=ON still fails. No need to update the PR, I'll add the include there myself.

@reionwong
reionwong merged commit c0d5fef into cutefishos:main Oct 24, 2026
@wineee
wineee deleted the fix/audio-spa-iter branch October 24, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants