diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-02 06:03:21 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-02 06:03:21 +0900 |
| commit | af741f20a003d48863eb5e9f7cf71052abd4116d (patch) | |
| tree | 0ec7e558e0fdfae6a772d37c3c87c721ca882e6b /internal/pipewire/core_test.go | |
| parent | 39c6716fb0081249908433403c4da6298a4d12d3 (diff) | |
internal/pipewire: implement client context
This consumes the entire sample, is validated to send identical messages and correctly handle received messages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core_test.go')
| -rw-r--r-- | internal/pipewire/core_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go index 9771eff3..9d19be4a 100644 --- a/internal/pipewire/core_test.go +++ b/internal/pipewire/core_test.go @@ -23,6 +23,7 @@ func TestFooterCoreGeneration(t *testing.T) { Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x23}, }, nil}, + // happens on the last message, client footer sent in the next roundtrip {"sample2", samplePWContainer[1][42][2], pipewire.Footer[pipewire.FooterCoreGeneration]{ Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION, Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x24}, @@ -35,13 +36,14 @@ func TestFooterCoreGeneration(t *testing.T) { {"sample0", samplePWContainer[3][0][2], pipewire.Footer[pipewire.FooterClientGeneration]{ Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION, - // why does this not match FooterCoreGeneration sample2? + // triggered by difference in sample1, sample0 is overwritten in the same roundtrip Payload: pipewire.FooterClientGeneration{ClientGeneration: 0x23}, }, nil}, /* sendmsg 2 */ {"sample1", samplePWContainer[6][0][2], pipewire.Footer[pipewire.FooterClientGeneration]{ + // triggered by difference in sample2, last footer in the previous roundtrip Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION, Payload: pipewire.FooterClientGeneration{ClientGeneration: 0x24}, }, nil}, |
