Пример #1
0
    //==============================================================================
    void initialise (const String& commandLine) override
    {
        // This method is where you should put your application's initialisation code..

        UnitTestRunner testRunner;

        testRunner.runAllTests();
     
        ScopedPointer<Component> c(new ModeSelect());
        int retval = DialogWindow::showModalDialog("Select Mode", c, nullptr, Colours::grey, false);
        mainWindow = new MainWindow (getApplicationName());

        if (0 == retval)
        {
            // server mode...
            mainWindow->SetText("SERVER");
            ServerController* c = new ServerController();
            mainWindow->SetController(c);
            fRpcServer = new RpcServer(c);
            this->RunServer();
        }
        else
        {
            // client mode.
            mainWindow->SetText("client");
            RpcClient* ipc = new RpcClient();
            fClientController = new ClientController(ipc);
            mainWindow->SetController(fClientController);
            this->RunClient();
        }


    }
bool ScumblerComponent::perform(const InvocationInfo& info)
{
  bool retval = true;
  switch (info.commandID)
  {
    case CommandIds::kNew:
    {

    }
    break;

    case CommandIds::kOpen:
    {

    }
    break;
    case CommandIds::kSave:
    {

    }
    break;
    case CommandIds::kSaveAs:
    {

    }
    break;

    case CommandIds::kPlay:
    {
      fScumbler->TogglePlay();
      // tell the command manager something has changed. This will make it
      // re-query us with getCommandInfo() and set the menu text to display either
      // 'Play' or 'Pause'
      gCommandManager->commandStatusChanged();
    }
    break;
    case CommandIds::kRunUnitTests:
    {
#ifdef qUnitTests
      // Unsubscribe this component from change notifications so we don't go
      // crazy when the tests are running
      fScumbler->removeChangeListener(this);
      UnitTestRunner runner;
      // run all tests even if there are failures.
      runner.setAssertOnFailure(false);
      runner.runAllTests();
      // hook us back up to the notifications.
      fScumbler->addChangeListener(this);
#endif
    }
    break;


  }
  return retval;
}
Пример #3
0
//==============================================================================
int main (int argc, char* argv[])
{
    
    static FieldManagerTests fieldManagerTests;
    UnitTestRunner runner;
    runner.setAssertOnFailure(false);
    runner.runAllTests();
    
    return 0;
}
Пример #4
0
    //==============================================================================
    void initialise (const String& /*commandLine*/)
    {
#if JUCE_DEBUG && DROWAUDIO_UNIT_TESTS
        UnitTestRunner testRunner;
        testRunner.runAllTests();
#endif
        
        SplashScreen* splash = new SplashScreen();
        splash->show ("dRowAudio Demo",
                      ImageCache::getFromMemory (BinaryData::splash_screen_png, BinaryData::splash_screen_pngSize),
                      0, true);

        // Do your application's initialisation code here..
        mainWindow = new MainAppWindow();
    }
Пример #5
0
//==============================================================================
JenSx1000AudioProcessor::JenSx1000AudioProcessor() :
ampEnvelope(JenConstants::AmpEnvMaxAttackTime, JenConstants::AmpEnvMaxDecayTime, JenConstants::AmpEnvMaxReleaseTime)

{
    //Run Unit tests
    if (true){
        std::cout << "processor created";
        UnitTestRunner runner;
        runner.runAllTests();
    }
    
    //------- VCO Params -------------------------------------------------------
    addParameter(vcoTuneParam = new JenParameter(*this, "VCO tune", 0.5));
    addParameter(vcoOctaveParam = new JenParameter(*this, "VCO octave", 0, 4));
    addParameter(vcoVibratoParam = new JenParameter(*this, "VCO vibrato", 0.5));
    addParameter(vcoWaveformParam = new JenParameter(*this, "VCO waveform", 0.5, 3));
    addParameter(vcoPulseWidthParam = new JenParameter(*this, "VCO pulse width", 0.5));
    addParameter(vcoPWMParam = new JenParameter(*this, "VCO PWM", 0.5));
    addParameter(vcoLevelParam = new JenParameter(*this, "VCO level", 0.5));
    addParameter(vcoGlideParam = new JenParameter(*this, "VCO glide", 0.5));
    
    //------- LFO Params ------------------------------------------------------
    addParameter(lfoSpeedParam = new JenParameter(*this, "LFO speed", 0.5));
    
    //------- VCF Params ------------------------------------------------------
    addParameter(vcfFrequencyParam = new JenParameter(*this, "VCF frequency", 0.5));
    addParameter(vcfResonanceParam = new JenParameter(*this, "VCF resonance", 0.5));
    addParameter(vcfLFOParam = new JenParameter(*this, "VCF LFO", 0.5));
    addParameter(vcfEnvLevelParam = new JenParameter(*this, "VCF env. level", 0.5));
    addParameter(vcfAttackParam = new JenParameter(*this, "VCF attack", 0.3));
    addParameter(vcfDecayParam = new JenParameter(*this, "VCF decay", 0.3));
    addParameter(vcfSustainParam = new JenParameter(*this, "VCF sustain", 0.5));
    addParameter(vcfReleaseParam = new JenParameter(*this, "VCF release", 0.3));
    
    //------- Noise Params ----------------------------------------------------
    addParameter(noiseNoiseParam = new JenParameter(*this, "NOISE noise", 0.5, 3));
    addParameter(noiseLevelParam = new JenParameter(*this, "NOISE level", 0.5));
    
    //------- VCA Params ------------------------------------------------------
    addParameter(vcaOutputVolumeParam = new JenParameter(*this, "VCA level", 0.5));
    addParameter(vcaAttackParam = new JenParameter(*this, "VCA attack", 0.3));
    addParameter(vcaDecayParam = new JenParameter(*this, "VCA decay", 0.3));
    addParameter(vcaSustainParam = new JenParameter(*this, "VCA sustain", 0.5));
    addParameter(vcaReleaseParam = new JenParameter(*this, "VCA release", 0.3));
    
    setCurrentProgram(0);
}