Skip to content

Commit f1b9688

Browse files
b-maorottier
authored andcommitted
fix: setter return values
1 parent 7958cff commit f1b9688

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/param.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ pub(crate) struct AudioParamRaw {
274274
default_value: f32, // immutable
275275
min_value: f32, // immutable
276276
max_value: f32, // immutable
277+
automation_rate: AutomationRate,
277278
automation_rate_constrained: bool,
278279
// TODO Use `Weak` instead of `Arc`. The `AudioParamProcessor` is the owner.
279280
shared_parts: Arc<AudioParamShared>,
@@ -318,7 +319,7 @@ impl AudioNode for AudioParam {
318319
impl AudioParam {
319320
/// Current value of the automation rate of the AudioParam
320321
pub fn automation_rate(&self) -> AutomationRate {
321-
self.raw_parts.shared_parts.load_automation_rate()
322+
self.raw_parts.automation_rate
322323
}
323324

324325
/// Update the current value of the automation rate of the AudioParam
@@ -331,6 +332,7 @@ impl AudioParam {
331332
panic!("InvalidStateError: automation rate cannot be changed for this param");
332333
}
333334

335+
self.automation_rate = value;
334336
self.registration().post_message(value);
335337
}
336338

0 commit comments

Comments
 (0)