Closed paulreimer closed 3 months ago
I should add that my clients currently don't have any sinks, as I am intending these clients to only ever be sending data.
AOO author here. SonoBus still uses a rather old AOO version which made it difficult to negotiate sink IDs among peers. That's why you have the dummy source, handshake and invitation.
I'm not too familiar with the exact logic and thus cannot really help with your question, but I wanted to point out that recent AOO (test) versions do not have this problem. Specifically, AOO v0.2-test3 has introduced the concept of group IDs and user IDs. In an online jamming app like SonoBus, each client would create a sink for every peer, using the peer's user ID as the sink ID.
For example:
Client A creates two sinks with IDs 2 and 3 so that B and C can send to A using their own user IDs.
@essej is planning to update SonoBus to the final AOO 2.0 version once it has been released.
@Spacechild1 noted! I actually first made my clients with the new API (not understanding that it was a breaking change), and I really enjoyed using it. Especially now that I've made new clients with the older API, I can really see both the improvements in functionality but also in developer experience. Looking forward to using it to interop with a future Sonobus version!
Yeah, the sink/source number handshake is kind of a pain right now, and I've been a bit of out it for a while... it will definitely be better when I make the switch over to the latest AOO with SB 2. It'll take some time for me to give you an answer about what you should do to interoperate...
I can really see both the improvements in functionality but also in developer experience.
@paulreimer Glad to hear :)
@essej I think I figured this out! (at least my custom client seems to be working with 2 concurrent Sonobus instances)
In my client I have:
id=0
)id=1
)And I can expect an initial invite from Sonobus to the dummy source. And at that point I take that invite (for my source id=0
) and pretend it was received by the audio source (id=1
); just configure that source with the provided sink id that the dummy source was sent.
Shortly afterwards, an uninvite message is sent from Sonobus to my dummy source, which I just ignore, because I never did anything with the original dummy invite -- other than inspect it to find the desired sink id.
Seems to work OK!
I am creating custom AOO clients (send-only) for interop with SonoBus 1.x clients, and one thing I haven't figured out is how I should be setting up my clients' source(s).
Specifically, I see from the SonoBus code that there is a dummy source with
id=0
. If my client also its own source withid=0
, everything sort of works! But I am unable to then mute my peer in SonoBus (uninvite is not sent to my/aoo/src/0
). After this, things get really wonky.How is it supposed to work? I see that SonoBus clients eventually do some sort of handshake that ends up with them starting on
id=0
, and then doing an invite toid=1
followed by uninvite to theid=0
s. (My guess is that other clients should also use two sources, one withid=0
and another with a non-zero id. Is that right?)