Skip to content

Commit

Permalink
slight cleanup / reformat / refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargaj committed Jul 8, 2022
1 parent b9bcae8 commit ffed482
Show file tree
Hide file tree
Showing 25 changed files with 4,518 additions and 4,336 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Bonzomatic
.obj
.aps
tmp
build
build.*
Expand Down
12 changes: 8 additions & 4 deletions src/Capture.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
namespace Capture
{
void LoadSettings(jsonxx::Object & o);
bool Open(RENDERER_SETTINGS & settings);
void CaptureFrame();
void Close();
//////////////////////////////////////////////////////////////////////////

void LoadSettings( jsonxx::Object & o );
bool Open( Renderer::Settings & settings );
void CaptureFrame();
void Close();

//////////////////////////////////////////////////////////////////////////
}
10 changes: 7 additions & 3 deletions src/Clipboard.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
namespace Clipboard
{
void Copy( const char * data, int len );
int GetContentsLength();
void GetContents( char * data, int len );
//////////////////////////////////////////////////////////////////////////

void Copy( const char * data, int len );
int GetContentsLength();
void GetContents( char * data, int len );

//////////////////////////////////////////////////////////////////////////
}
28 changes: 16 additions & 12 deletions src/FFT.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
#define FFT_SIZE 1024

typedef struct
namespace FFT
{
//////////////////////////////////////////////////////////////////////////

struct Settings
{
bool bUseRecordingDevice;
void * pDeviceID;
} FFT_SETTINGS;
};

namespace FFT
{
typedef void (*FFT_ENUMERATE_FUNC)( const bool bIsCaptureDevice, const char * szDeviceName, void * pDeviceID, void * pUserContext );
typedef void ( *FFT_ENUMERATE_FUNC )( const bool bIsCaptureDevice, const char * szDeviceName, void * pDeviceID, void * pUserContext );

extern float fAmplification;

extern float fAmplification;
void EnumerateDevices( FFT_ENUMERATE_FUNC pEnumerationFunction, void * pUserContext );

void EnumerateDevices( FFT_ENUMERATE_FUNC pEnumerationFunction, void * pUserContext );
bool Create();
bool Destroy();
bool Open( Settings * pSettings );
bool GetFFT( float * _samples );
void Close();

bool Create();
bool Destroy();
bool Open( FFT_SETTINGS * pSettings );
bool GetFFT( float * _samples );
void Close();
//////////////////////////////////////////////////////////////////////////
}
32 changes: 18 additions & 14 deletions src/MIDI.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
namespace MIDI
{
enum
{
MIDIMSG_NOTE_OFF = 8,
MIDIMSG_NOTE_ON = 9,
MIDIMSG_POLYPHONIC_KEY = 10,
MIDIMSG_CONTROL_CHANGE = 11,
MIDIMSG_PROGRAM_CHANGE = 12,
MIDIMSG_CHANNEL_PRESSURE = 13,
MIDIMSG_PITCH_BEND = 14,
MIDIMSG_SYSTEM = 15,
} MIDI_MESSAGE_TYPE;
//////////////////////////////////////////////////////////////////////////

bool Open();
bool Close();
float GetCCValue( unsigned char cc );
enum
{
MIDIMSG_NOTE_OFF = 8,
MIDIMSG_NOTE_ON = 9,
MIDIMSG_POLYPHONIC_KEY = 10,
MIDIMSG_CONTROL_CHANGE = 11,
MIDIMSG_PROGRAM_CHANGE = 12,
MIDIMSG_CHANNEL_PRESSURE = 13,
MIDIMSG_PITCH_BEND = 14,
MIDIMSG_SYSTEM = 15,
} MIDI_MESSAGE_TYPE;

bool Open();
bool Close();
float GetCCValue( unsigned char cc );

//////////////////////////////////////////////////////////////////////////
};
18 changes: 11 additions & 7 deletions src/Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

namespace Misc
{
void PlatformStartup();
void PlatformShutdown();
//////////////////////////////////////////////////////////////////////////

void InitKeymaps();
void GetKeymapName( char * sz );
bool ExecuteCommand( const char * cmd, const char * param );
void PlatformStartup();
void PlatformShutdown();

bool FileExists(const char * path);
const char * GetDefaultFontPath();
void InitKeymaps();
void GetKeymapName( char * sz );
bool ExecuteCommand( const char * cmd, const char * param );

bool FileExists( const char * path );
const char * GetDefaultFontPath();

//////////////////////////////////////////////////////////////////////////
}
Loading

0 comments on commit ffed482

Please sign in to comment.