This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
Removal of a superfluous include in AudioAlsaSetupWidget.cpp
Removal of the function "bool hasCapabilities(char *device_name)" which
was not used anyway. It implemented a test for ALSA device capabilities
needed by LMMS (SND_PCM_ACCESS_RW_INTERLEAVED, SND_PCM_FORMAT_S16_LE,
etc.).
Corrected header name in AudioAlsaSetupWidget.h.
Created an implementation file for AudioDeviceSetupWidget to make more
clear that it's part of the GUI.
Fix build for builds that use Port Audio. The setup widget of
AudioPortAudio.h still inherited from AudioDevice::setupWidget instead
of the new AudioDeviceSetupWidget.
This version lets the user select the ALSA device to use with a combo
box. It does not check whether the device works for the parameters that
LMMS uses (SND_PCM_ACCESS_RW_INTERLEAVED, SND_PCM_FORMAT_S16_LE, etc.).
Doing these checks while compiling the list of available devices led to
strange effects which are likely caused by the fact that the PCM device
has to be opened to query its capabilities. This in turn led to error
messages a la "Resource or device busy" when testing the new
functionality repeatedly.
However, having a combo box to select devices from should be a good step
forward compared to a simple line edit. :)
Moved AudioDevice::setupWidget into its own class AudioDeviceSetupWidget
which logically should belong to the GUI (unfortunately the include
structure does not make this obvious).
For the ALSA driver there is an implementation AudioAlsaSetupWidget
which provides a combo box for selection of the card and device.
All other driver widgets have been changed to inherit from
AudioAlsaSetupWidget but have not been changed otherwise.
SetupDialog has been adjusted to keep a map of AudioAlsaSetupWidgets
now.