Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Document and add update_display to Host #126

Merged
merged 4 commits into from
May 12, 2020
Merged

Document and add update_display to Host #126

merged 4 commits into from
May 12, 2020

Conversation

frabert
Copy link
Contributor

@frabert frabert commented May 10, 2020

Reopens #125

I'm not currently using vst-rs anymore, so I won't be able to properly test this. I'll gladly accept fixes and suggestions before merging.

cc @askeksa

Copy link
Contributor

@askeksa askeksa left a comment

Choose a reason for hiding this comment

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

Thanks for the patch. This is a very useful feature.

I have tested it in Renoise, Bitwig Studio, REAPER and Ableton Live, and it's working great in all of them.

src/host.rs Outdated
@@ -147,7 +147,9 @@ pub enum OpCode {
/// Get the current directory.
/// [return]: `FSSpec` on OS X, `char*` otherwise
GetDirectory,
/// No arguments. TODO: Figure out what this does.
/// Tell the host that the plugin's parameters have changed, refresh the UI.
///
Copy link
Contributor

Choose a reason for hiding this comment

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

The travis failure seems to be caused by the trailing space here.

@@ -222,6 +224,9 @@ pub trait Host {
fn get_block_size(&self) -> isize {
0
}

/// Refresh UI after the plugin's parameters changed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add to doc comment:

Note: some hosts will call some PluginParameters methods from within the update_display call, including get_parameter, get_parameter_label, get_parameter_name and get_parameter_text.

@frabert
Copy link
Contributor Author

frabert commented May 10, 2020

I made the changes to the documentation, but it seems that some problems in the CI may be related to recent changes in Rust's API or style guides.

@askeksa
Copy link
Contributor

askeksa commented May 10, 2020

Clippy issues fixed in d608f3e. Try rebasing your branch onto this commit. That should make it pass the CI.

* Remove unnecessary parentheses
* Remove deprecated `Error::description` (closes #123)
* Avoid zero initialization of `AEffect`
* Use `to_bits` to get bits from `f32`
@frabert
Copy link
Contributor Author

frabert commented May 11, 2020

Done!

@askeksa askeksa merged commit f0b7fd3 into RustAudio:master May 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants