/* ============================================================================== This is an automatically generated GUI class created by the Introjucer! Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded and re-saved. Created with Introjucer version: 3.1.0 ------------------------------------------------------------------------------ The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-13 by Raw Material Software Ltd. ============================================================================== */ #ifndef __JUCE_HEADER_9002020A4DD09B20__ #define __JUCE_HEADER_9002020A4DD09B20__ //[Headers] -- You can add your own extra header files here -- #include "JuceHeader.h" #include "IQPlaneComponent.h" #include "GraphComponent.h" #include "LogComponent.h" #include "ControlComponent.h" #include "Receiver.hpp" #include "Transmitter.hpp" #include #include "ReceiverBuffer.hpp" //[/Headers] //============================================================================== /** //[Comments] An auto-generated component, created by the Introjucer. Describe your class and how it works here! //[/Comments] */ class MainComponent : public Component, public ChangeListener, public AudioIODeviceCallback, public ReceiverDataListener, public LogHandler, public Timer, public Thread { public: //============================================================================== MainComponent (); ~MainComponent(); //============================================================================== //[UserMethods] -- You can add your own custom methods in this section. //[/UserMethods] void paint (Graphics& g); void resized(); private: //[UserVariables] -- You can add your own custom variables in this section. CriticalSection m_lock; LogComponent m_log; ScopedPointer m_TextEditor; ScopedPointer m_pReceiver; ScopedPointer m_pTransmitter; ScopedPointer m_sharedAudioDeviceManager; ScopedPointer m_AudioDeviceSelectorComponent; ScopedPointer m_ControlComponent; ReceiverInterface *m_pReceiverControl; TransmitterInterface *m_pTransmitterControl; float m_samplerate; RxBuffer<2> m_rxBuf; void timerCallback() override; void changeListenerCallback (ChangeBroadcaster*) override; void run(); AudioDeviceManager& getSharedAudioDeviceManager(); void audioDeviceIOCallback (const float** inputChannelData, int numInputChannels, float** outputChannelData, int numOutputChannels, int numSamples); void audioDeviceAboutToStart (AudioIODevice* device); void audioDeviceStopped(); void receiverDataChanged(Receiver *pObj) { m_pIQPlaneComponent->pointAdd(pObj->getSoftSyms()); for (size_t i=0; i < 4; i++) { m_pIQPlaneComponent->trackerPointEnable(i, juce::Colours::red, ((ReceiverInterface*)pObj)->getTracker(i), 15); } } void handleMessage(String msg) { m_TextEditor->moveCaretToEnd(); m_TextEditor->insertTextAtCaret (msg + newLine); } //[/UserVariables] //============================================================================== ScopedPointer tabbedComponent; ScopedPointer m_pIQPlaneComponent; ScopedPointer m_pGraphComponent; //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent) }; //[EndFile] You can add extra defines here... //[/EndFile] #endif // __JUCE_HEADER_9002020A4DD09B20__