-
Notifications
You must be signed in to change notification settings - Fork 90
Document and add update_display
to Host
#126
Conversation
There was a problem hiding this 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. | |||
/// |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
.
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. |
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`
Done! |
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