internal/pipewire: seq access method for consume

This improves readability as the offset is not immediately obvious.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-07 17:07:30 +09:00
parent 15c2839a09
commit 8cdd659239
5 changed files with 12 additions and 5 deletions

View File

@@ -628,6 +628,10 @@ func (ctx *Context) roundtrip() (err error) {
}
}
// currentSeq returns the current sequence number.
// This must only be called from eventProxy.consume.
func (ctx *Context) currentSeq() Int { return ctx.sequence - 1 }
// currentRemoteSeq returns the current remote sequence number.
// This must only be called from eventProxy.consume.
func (ctx *Context) currentRemoteSeq() Int { return ctx.remoteSequence - 1 }