MCPcopy Create free account
hub / github.com/christophhart/HISE / sanityCheck

Method sanityCheck

hi_scripting/scripting/scriptnode/api/TestClasses.cpp:624–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622}
623
624Result Buffer2Ascii::sanityCheck() const
625{
626 if (numLines == 0)
627 return Result::fail("numLines must not be zero");
628
629 if (getNumSamples() == 0)
630 return Result::fail("Buffer must not have zero length");
631
632 if (isMultiChannel())
633 {
634 for (int i = getNumChannels() - 1; i >= 0; i--)
635 {
636 auto c = getChannel(i);
637 if (c == nullptr)
638 return Result::fail("channel " + String(i + 1) + " is not a buffer");
639
640 if (c->size != getNumSamples())
641 return Result::fail("channel size mismatch at channel " + String(i + 1));
642 }
643 }
644
645 return Result::ok();
646}
647
648juce::juce_wchar Buffer2Ascii::getChannelChar(int channelIndex) const
649{

Callers 2

createAsciiDiffMethod · 0.45

Calls 3

getNumChannelsFunction · 0.85
getChannelFunction · 0.85
StringClass · 0.50

Tested by

no test coverage detected