Add Settings dialog skeleton

Add an empty Settings dialog.  The audio and VST plugin configuration
dialogs will be converted into Settings dialog pages in later patches.

This change is necessary to make room for new features like MIDI.  We
don't want to add too many different configuration dialogs.  It's nicer
to have a single Settings dialog with different pages.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Convert VSTConfigDialog into VSTSettingsPage

Move VST configuration into a Settings dialog page.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Convert PortAudioConfigDialog to PortAudioSettingsPage

Move PortAudio configuration into the Settings dialog.  A few changes
are necessary because the old dialog lifecycle does not exist when
converted to a Settings dialog page:

The Apply/Cancel buttons are removed.  Therefore all changes have
immediate effect.  This is similar to the Google Chrome settings dialog.

The old dialog disabled the Apply button if the sound devices did not
support the current settings.  The new Settings dialog page has a QLabel
that tells the user whether or not these settings will work.  Invalid
settings can be saved but the an error dialog will be displayed before
bringing the user back to the audio settings.

Saving/loading QSettings has been adjusted so that settings are loaded
on startup and saved each time the Settings dialog is closed.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Fix unused argument warnings in PortAudioSettingsPage

These warnings existed before the PortAudioConfigDialog was turned into
PortAudioSettingsPage.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Check for VSTPluginMain symbol

Modern VST plugins use the VSTPluginMain entry point instead of main.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Save scanned VST plugins

Save VST plugin filenames and restore them from QSettings.  This
prevents rescanning on every launch.

The VST plugin filename is now displayed instead of the human-readable
name.  This reduces startup time since it avoids loading every VST to
query its name.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add Mac VST search support

VSTs are packaged like this on Mac:

  <vst-name>.vst/Contents/MacOS/<vst-name>

Modify the VST search algorithm to detect .vst directories on Mac.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Use platform-specific default VST search paths

On Mac and Windows there are default locations for VST plugins.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add ellipsis to "&Settings..." menu item

Dropped this by mistake when converting to the Settings dialog.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add multi-writer, single-reader ConcurrentQueue

ConcurrentQueue allows message passing between threads.  The write side
supports multiple writers using a lock.  The read side supports a single
reader with a polling approach (therefore never waiting for a lock).

This queue is suitable for passing data between periodic threads like
the audio thread and the MIDI thread, which will be added in later
patches.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add PortMidiStreamer

PortMidiStreamer is the MIDI engine.  MIDI messages are sent and
received through ConcurrentQueue<PmEvent> queues because the streamer
runs in a dedicated polling thread.  The PortMidi library does not
support an event-driven interface so we cannot integrate MIDI into the
GUI thread.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add PortMidiSettingsPage to Settings dialog

Add a Settings dialog page for configuring MIDI devices.  By default
MIDI is off.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add MIDI processing to VSTPlugin

Add MIDI input and output to VSTPlugin.  Note that input/output is not
yet hooked up.  The next patch will do that.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add MIDI processing to VSTProcessor

Pass the MIDI output queue to each VSTPlugin and handling MIDI input
events.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Start MIDI when connecting to jam

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add MIDI Beat Clock support

Send MIDI clock pulses so external applications and devices can
synchronize to the tempo.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>