We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1a3805a + f77e2bd commit 6e7f1a4Copy full SHA for 6e7f1a4
main/src/domain/targets/track_peak_target.rs
@@ -61,8 +61,15 @@ impl<'a> Target<'a> for TrackPeakTarget {
61
impl TrackPeakTarget {
62
fn peak(&self) -> Option<Volume> {
63
let reaper = Reaper::get().medium_reaper();
64
- let channel_count = unsafe {
65
- reaper.get_media_track_info_value(self.track.raw(), TrackAttributeKey::Nchan) as i32
+ let vu_mode = unsafe {
+ reaper.get_media_track_info_value(self.track.raw(), TrackAttributeKey::VuMode) as i32
66
+ };
67
+ let channel_count = if matches!(vu_mode, 2 | 8) {
68
+ unsafe {
69
+ reaper.get_media_track_info_value(self.track.raw(), TrackAttributeKey::Nchan) as i32
70
+ }
71
+ } else {
72
+ 2
73
};
74
if channel_count <= 0 {
75
return None;
0 commit comments