Skip to content

Feature/channel meters - #42

Merged
corrados merged 8 commits into
jamulussoftware:masterfrom
pljones:feature/channel-meters
Apr 6, 2020
Merged

corrados merged 8 commits into
jamulussoftware:masterfrom
pljones:feature/channel-meters

Conversation

@pljones

@pljones pljones commented Apr 5, 2020

Copy link
Copy Markdown
Collaborator

OK, so next attempt :)

The proposed manual changes are here:
https://github.com/pljones/jamulus/blob/feature/channel-meters/src/res/homepage/manual.md

@pljones
pljones force-pushed the feature/channel-meters branch 5 times, most recently from f804c39 to 8f6c1a0 Compare April 5, 2020 20:52
@corrados

corrados commented Apr 6, 2020

Copy link
Copy Markdown
Contributor

I have just updated the centest server with your newest code. I'll test it later when more people are online. Feel free to test on this server, too, if you like.

Comment thread src/global.h
#define PING_UPDATE_TIME_SERVER_LIST_MS 2000 // ms

// defines the interval between Channel Level updates from the server
#define CHANNEL_LEVEL_UPDATE_INTERVAL 100 // number of frames

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number is not given in ms but in frames. So it is dependent on the frame size and sample rate, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- will your work affect this? If the frame frequency drops, I guess the channel level update interval should also drop?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am currently working on supporting different frame sizes in the server. So I have to make sure that your update time stays the same no matter which frame size is in use by the server right now. No big deal, I just have to remember it that there is something to do :-).

Comment thread src/protocol.cpp
const CVector<uint8_t>& vecData )
{
int iPos = 0; // init position pointer
const int iDataLen = vecData.Size(); // four bits per channel, 2 channels per byte

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could introduce a plausability check here. The maximum possible number of channels at the server is given in the global.h file. You could check that the length of the data vector does not exceed that number, i.e. the number of bits times the maximum possible number of channels.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'll add that (just before rebasing).

@corrados

corrados commented Apr 6, 2020

Copy link
Copy Markdown
Contributor

Hmm, too bad. I just checked in some modifications in the protocol which made your commit to have merge conflicts.
I tested your new version and it seems to run just fine. Since we already had some iterations with the pull requests, I would recommend to merge your code to the master now and do fixes from there. Can you please re-base your pull request once more so that I can merge your code without merge conflicts? Thank you.

@pljones
pljones force-pushed the feature/channel-meters branch from 8f6c1a0 to c6b702c Compare April 6, 2020 18:00
@pljones

pljones commented Apr 6, 2020 •

Copy link
Copy Markdown
Collaborator Author

OK rebased with check for MAX_NUM_CHANNELS added - is it okay?

Testing: it compiles clean still :).

-edit-
OK, tested locally with two clients and it appears to still work, too.

@corrados
corrados merged commit 94ad067 into jamulussoftware:master Apr 6, 2020
@corrados

corrados commented Apr 6, 2020

Copy link
Copy Markdown
Contributor

Great, thank you for your fast response. The code looks good to me. I'll merge it now. Again, thank you very much for this contribution. In these times with croweded servers it is a really useful tool. Unfortunately, all the existing servers have to update to a new version so that it works for them, too.

@pljones
pljones deleted the feature/channel-meters branch April 6, 2020 18:14
@pljones

pljones commented Apr 6, 2020

Copy link
Copy Markdown
Collaborator Author

Thanks for the comments. I've updated jamulus.drealm.info now.

Does the central server know the version of a registering server? Be interesting to have stats on how fast each version usually gets rolled out to server.

@corrados

corrados commented Apr 6, 2020

Copy link
Copy Markdown
Contributor

Yes, this is already implemented. Just define the following and re-compile: https://github.com/corrados/jamulus/blob/master/src/global.h#L78. Then open the Server List.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants