Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mute source commands #37

Merged
merged 7 commits into from
Feb 13, 2017

Conversation

mikhailswift
Copy link

Implements ToggleMute (inverts source's mute) and SetMute (sets mute to true or false).

Copy link
Contributor

@Palakis Palakis left a comment

Choose a reason for hiding this comment

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

Nice contribution! I had those commands in mind but didn't took time to implement them.
I reviewed your PR and added some comments about some things to change. I'll merge the PR once everything is OK.


obs_source_t* item = obs_get_source_by_name(item_name);
if (!item) {
owner->SendErrorResponse("invalid request parameters");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a return instruction after calling SendErrorResponse.


obs_source_t* item = obs_get_source_by_name(item_name);
if (!item) {
owner->SendErrorResponse("specified source doesn't exist");
Copy link
Contributor

Choose a reason for hiding this comment

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

Same remark here as line 403.

PROTOCOL.md Outdated
@@ -236,6 +236,20 @@ __Request fields__ :
__Response__ : OK if source exists, with these additional fields :
- **"name"** (string) : name of the requested source
- **"volume"** (double) : volume of the requested source, on a linear scale (0.0 to 1.0)
- **"muted"** (bool) : mute status of the requested source

### "SetMute"
Copy link
Contributor

Choose a reason for hiding this comment

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

The title is one level too high. Should be #### "SetMute" instead of ### "SetMute"

PROTOCOL.md Outdated
- **"source"** (string) : the name of the source
- **"mute"** (bool) : the desired mute status

### "ToggleMute"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as line 241 : should be #### "ToggleMute instead.

@mikhailswift
Copy link
Author

@Palakis Thanks for the review, and thanks for this great project! This project has helped the stream group I'm involved with immensely. I've addressed the items in your review.

@Palakis Palakis merged commit bb232f1 into obsproject:master Feb 13, 2017
@Huesdon
Copy link

Huesdon commented Feb 13, 2017

Looking forward to this being packaged and released. I'm having to do mouseclicks to mute right now and it is painful. Thanks guys.

@Palakis
Copy link
Contributor

Palakis commented Feb 14, 2017

Once this nasty and tricky bug is fixed, I'll be able to package a new binary release.

@mikhailswift mikhailswift deleted the add_mute_source_command branch February 16, 2017 17:29
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.

3 participants