Skip to content

Commit

Permalink
Fixing WaveformView for channel counts other than 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jul 1, 2024
1 parent 38f4fa5 commit fe4a8a9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class WaveformView : public juce::Component,

int numSamples { 1024 };
int inputSamplesPerBlock { 256 };
std::array<ChannelInfo, (size_t) numChannels> channels { ChannelInfo { *this, numSamples }, ChannelInfo { *this, numSamples } };
std::array<ChannelInfo, (size_t) numChannels> channels {
make_array_lambda<ChannelInfo, (size_t) numChannels> ([this] (size_t)
{ return ChannelInfo { *this, numSamples }; })
};

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WaveformView)
};
Expand Down

0 comments on commit fe4a8a9

Please sign in to comment.