Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AudioSubscribers and Null

Avatar

Avatar
Validate 1
Level 1
asciibn
Level 1

Likes

0 likes

Total Posts

90 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
asciibn
Level 1

Likes

0 likes

Total Posts

90 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
asciibn
Level 1

29-03-2011

Hi,

So Im trying to listen to 3 users in a room Host, Player 1 and Player 2. so i got somthing like this:

view.audioSub.publisherIDs = [service.OwnerCamID, service.PlayerCamID, service.SecondPlayerCamID];

Each item in the array represents a LCCS ID.

So what if any one of these turn out to be null? Do i loose the audio for everyone?

Also since this is an array If i have something like this in my code in a few places. Could I be adding the same users more than once. I see in the room console that I have multiple audio subscriptions to the same person as i switch them bewteen subscribers

(big cam subscriber vs. little cam subscribers)

If so then im guessing it will effect performance.

thanks.

...russ

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
asciibn
Level 1

Likes

0 likes

Total Posts

90 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
asciibn
Level 1

Likes

0 likes

Total Posts

90 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
asciibn
Level 1

30-03-2011

This sounds great. I'll take a look.

Im going to guess that video has something similar?

thanks!

...russ

Avatar

Avatar
Boost 50
Level 7
Nigel_Pegg
Level 7

Likes

103 likes

Total Posts

909 posts

Correct Reply

81 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile

Avatar
Boost 50
Level 7
Nigel_Pegg
Level 7

Likes

103 likes

Total Posts

909 posts

Correct Reply

81 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile
Nigel_Pegg
Level 7

30-03-2011

Hey ...russ,

Actually, check out the code in AudioSubscriber for when you set

publisherIDs. It's actually smarter than I'd guessed (go Basu!) - what it

does is immediately take the publisherIDs Array and turn it into a

"whitelist" (_publisherIDTable[pubID]=true) of streams it's allowed to play.

When it comes time to play all streams, it just goes through the entire set

of audio streams in the room, and checks each against _publisherIDTable to

see if there's a true for that pubID. Duplicate entries shouldn't matter,

and nor should nulls. You should be good to go.

nigel