Posts: 23,468
Joined: Aug 2011
Reputation:
1,101
fritsch
Team-Kodi Developer
Posts: 23,468
I left a comment in your bugreport and kindly asked what PW wants us to do and gave reasoning why kodi behaves like it behaves.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 9
Joined: Dec 2023
Reputation:
0
Saw that, thank you.
I ripped out the 32 bit float formats from AESinkPipewire.cpp to satisfy my curiosity. Removing only this line resulted in the AESink not being initialized, though, so had to purge all references. Doing this resulted in...
exactly the same behaviour as with the float format still in place.
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
R 41 512 48000 571.7us 22.7us 0.05 0.00 0 S32LE 2 48000 alsa_output.usb-miniDSP_miniDSP_Flex-00.analog-stereo
R 51 735 44100 125.5us 334.1us 0.01 0.03 0 S32LE 2 44100 + Kodi
Yes, I've put the default rate to 48000 to stop you from frowning.
Posts: 23,468
Joined: Aug 2011
Reputation:
1,101
fritsch
Team-Kodi Developer
Posts: 23,468
Frowning ;-).
Great - that's a bit of a surprise to me. Let's see what upstream says in the report.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 23,468
Joined: Aug 2011
Reputation:
1,101
fritsch
Team-Kodi Developer
Posts: 23,468
diff --git a/xbmc/cores/AudioEngine/Sinks/pipewire/AESinkPipewire.cpp b/xbmc/cores/AudioEngine/Sinks/pipewire/AESinkPipewire.cpp
index bc5e3d3f96..0fb3149a57 100644
--- a/xbmc/cores/AudioEngine/Sinks/pipewire/AESinkPipewire.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/pipewire/AESinkPipewire.cpp
@@ -410,12 +410,15 @@ bool CAESinkPipewire::Initialize(AEAudioFormat& format, std::string& device)
std::string fraction =
StringUtils::Format("{}/{}", frames / DEFAULT_LATENCY_DIVIDER, format.m_sampleRate);
+ std::string srate = StringUtils::Format("{}/{}", 1, format.m_sampleRate);
+
std::array<spa_dict_item, 5> items = {
SPA_DICT_ITEM_INIT(PW_KEY_MEDIA_TYPE, "Audio"),
SPA_DICT_ITEM_INIT(PW_KEY_MEDIA_CATEGORY, "Playback"),
SPA_DICT_ITEM_INIT(PW_KEY_APP_NAME, CCompileInfo::GetAppName()),
SPA_DICT_ITEM_INIT(PW_KEY_NODE_NAME, CCompileInfo::GetAppName()),
- SPA_DICT_ITEM_INIT(PW_KEY_NODE_LATENCY, fraction.c_str())};
+ SPA_DICT_ITEM_INIT(PW_KEY_NODE_LATENCY, fraction.c_str()),
+ SPA_DICT_ITEM_INIT(PW_KEY_NODE_RATE, srate.c_str())};
auto properties = SPA_DICT_INIT(items.data(), items.size());
m_stream->UpdateProperties(&properties);
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 9
Joined: Dec 2023
Reputation:
0
Closed the report upon testing your proposed diff, with one minor change added.
Posts: 23,468
Joined: Aug 2011
Reputation:
1,101
fritsch
Team-Kodi Developer
Posts: 23,468
2023-12-30, 11:05
(This post was last modified: 2023-12-30, 11:05 by fritsch.)
Awesome. Thanks for making our pipewire sink ready for primetime in upcoming v21.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.