Skip to content

Commit

Permalink
clang-format update of MIDI Analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus10110 committed Oct 29, 2020
1 parent 4160d4a commit b303444
Show file tree
Hide file tree
Showing 8 changed files with 1,623 additions and 1,374 deletions.
548 changes: 289 additions & 259 deletions src/MidiAnalyzer.cpp

Large diffs are not rendered by default.

85 changes: 43 additions & 42 deletions src/MidiAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,52 @@
class MidiAnalyzerSettings;
class MidiAnalyzer : public Analyzer2
{
public:
MidiAnalyzer();
virtual ~MidiAnalyzer();
virtual void WorkerThread();
virtual U32 GenerateSimulationData( U64 newest_sample_requested, U32 sample_rate, SimulationChannelDescriptor** simulation_channels );
virtual U32 GetMinimumSampleRateHz();
virtual const char* GetAnalyzerName() const;
virtual bool NeedsRerun();
public:
MidiAnalyzer();
virtual ~MidiAnalyzer();
virtual void WorkerThread();

virtual U32 GenerateSimulationData( U64 newest_sample_requested, U32 sample_rate, SimulationChannelDescriptor** simulation_channels );
virtual U32 GetMinimumSampleRateHz();

virtual const char* GetAnalyzerName() const;
virtual bool NeedsRerun();

virtual void SetupResults();
protected: //vars
union stash {
U64 mData2;
S8 channel;
} stash1;
bool inCommandPacket;
S64 distanceFromLastCommandPacket;
S32 dataFrameCorrespondingChannel;
enum MidiFrameType lastCommandPacketType;

protected: //functions
void dataParameter( U8 mData, enum MidiFrameType *mFrameType, union stash *mStash1);
void systemMessage( U8 mData, enum MidiFrameType *mFrameType, union stash *mStash1);
void channelMessage( U8 mData, enum MidiFrameType *mFrameType, union stash *mStash1);

protected: //vars
std::auto_ptr< MidiAnalyzerSettings > mSettings;
std::auto_ptr< MidiAnalyzerResults > mResults;
AnalyzerChannelData* mSerial;

MidiSimulationDataGenerator mSimulationDataGenerator;
bool mSimulationInitilized;
double Stop_Bits;
double Parity_Bit;

//Serial analysis vars:
U32 mSampleRateHz;
U32 mStartOfStopBitOffset;
U32 mEndOfStopBitOffset;

protected: // vars
union stash {
U64 mData2;
S8 channel;
} stash1;
bool inCommandPacket;
S64 distanceFromLastCommandPacket;
S32 dataFrameCorrespondingChannel;
enum MidiFrameType lastCommandPacketType;

protected: // functions
void dataParameter( U8 mData, enum MidiFrameType* mFrameType, union stash* mStash1 );
void systemMessage( U8 mData, enum MidiFrameType* mFrameType, union stash* mStash1 );
void channelMessage( U8 mData, enum MidiFrameType* mFrameType, union stash* mStash1 );

protected: // vars
std::auto_ptr<MidiAnalyzerSettings> mSettings;
std::auto_ptr<MidiAnalyzerResults> mResults;
AnalyzerChannelData* mSerial;

MidiSimulationDataGenerator mSimulationDataGenerator;
bool mSimulationInitilized;
double Stop_Bits;
double Parity_Bit;

// Serial analysis vars:
U32 mSampleRateHz;
U32 mStartOfStopBitOffset;
U32 mEndOfStopBitOffset;
};

extern "C" ANALYZER_EXPORT const char* __cdecl GetAnalyzerName();
extern "C" ANALYZER_EXPORT Analyzer* __cdecl CreateAnalyzer( );
extern "C" ANALYZER_EXPORT Analyzer* __cdecl CreateAnalyzer();
extern "C" ANALYZER_EXPORT void __cdecl DestroyAnalyzer( Analyzer* analyzer );

#endif //MIDI_ANALYZER_H
#endif // MIDI_ANALYZER_H
Loading

0 comments on commit b303444

Please sign in to comment.