2136 Commits

Author SHA1 Message Date
sergm
f8bc0be842 Fixed packaging of libmt32emu with RPM generator
The pkgconfig directory is no longer marked for creation assuming that
the system directory is specified in libmt32emu_PKGCONFIG_INSTALL_PREFIX
property so to avoid conflicts
2021-03-20 20:23:58 +02:00
sergm
59a4a0e30d Further improved pkg-config file generated for libmt32emu
- More of the package metadata fields are now filled from the CMake script
  thus reducing duplications
- When the library is build with external sample rate conversion,
  field Requires.private is now filled with the related dependency
  (either soxr or samplerate) thus fixing build of user applications
  that link against statically built libmt32emu in such cases
- Along the way, variable MT32EMU_EXT_LIBS is now unset when building
  a shared library to avoid pollution of variable MT32EMU_LIBRARIES
  with unnecessary dependencies
2021-03-14 19:21:36 +02:00
sergm
70fae811c7 Fixed various cases of UB in libmt32emu, related to (#51)
- In TVP::process, UB was possible due to right shifts with counter values
  exceeding the maximum permitted limit of 31 (similarly to the original
  hardware); we now attempt to emulate that in the same way as in
  calcVeloMult implemented in 41980704d2
- In TVP::setupPitchChange spotted by clang static analyzer, a negative
  value could be shifted left
2021-03-13 13:04:02 +02:00
sergm
f4498e6efe libmt32emu: Updated NEWS.txt 2021-03-07 23:08:43 +02:00
sergm
066f0884a7 Extended the C API to simplify handling of ROM images (#47)
- mt32emu_get_machine_ids enables to retrieve a list of all supported
  hardware configurations as opposed to individual ROM images
- mt32emu_get_rom_ids to retrieve a list of identifiers of all supported
  ROMs, optionally for a specific machine
- A couple of convenience functions to identify a given ROM image
  without applying any changes to the emulation context
- New function mt32emu_add_machine_rom_file facilitates implementation
  of a ROM scanner that traverses files in a given directory and adds
  to the emulation context those compatible with a specific machine
2021-03-07 23:08:18 +02:00
sergm
575774ee0f Added three new convenience methods to ROMInfo
These provide for retrieving a list of all known / full / partial ROMInfos
with less overhead than using ROMInfo::getROMInfoList
2021-03-06 20:56:44 +02:00
sergm
d398d1695a Made const the two instance methods of MachineConfiguration as intended 2021-03-06 20:51:28 +02:00
sergm
67a8139b3f libmt32emu: Introduced notion of machine configuration
That is currently concerns of a set of relevant ROMs only, thus making it
possible to find all ROMs for a desired machine configuration that are
mutually compatible and can be used in the emulation engine.
2021-02-21 18:51:29 +02:00
sergm
42825660e9 libmt32emu: Introduced a global header mt32emu.h
that now merely wraps <mt32emu/mt32emu.h> for convenience.
This file is autogenerated by the build system.

Although, a reorganisation of public headers is rather imminent,
but it will only happen on next major release.
2021-02-21 14:08:24 +02:00
Serg M
6d39790f0f Merge pull request #48 from dreamer/po/effcpp-warnings-1
Fix effc++ warnings in libmt32emu interface
2021-02-17 10:36:03 +02:00
Patryk Obara
eb34afc2e8 Fix effc++ warnings in libmt32emu interface
When users of the library compile code with -Weffc++, this class
triggers warning:

  ‘class MT32Emu::Service’ has pointer data members
  but does not declare ‘MT32Emu::Service(const MT32Emu::Service&)’
  or ‘operator=(const MT32Emu::Service&)’

Class Service aggregates an owning raw pointer (mt32emu_context), which
is being taken over via constructor and freed in destructor - this might
lead user to accidentally double free the pointed object if a Service
object was accidentally copied through default copy c-tor or default
assignment operator.

Declare copy c-tor and operator= private to prevent creation of
accidental copy (this fixes the warning).

When upgrading this code to C++11, these declarations should be
marked with '= delete' (and won't need to be private any more).
2021-02-16 23:39:49 +01:00
sergm
17ccc4bf7b Fixed a memory leak in method ROMImage::makeROMImage(File *, File *) 2021-02-13 20:38:48 +02:00
sergm
a53acf4cd3 Added support for merging partial ROM images in the C API (#44)
- New functions mt32emu_merge_and_add_rom_data and
  mt32emu_merge_and_add_rom_files accept a pair of ROMs to be merged
  and added to the emulation context upon success
- Improved descriptions of functions mt32emu_add_rom_data and
  mt32emu_add_rom_file to mention the fact that they only handle full
  ROM images yet to highlight the requirement wrt. memory allocation
  of the ROM data array
2021-02-11 23:56:47 +02:00
sergm
3d94173733 Further extended ROMImage API (#44)
- Added method ROMImage::isFileUserProvided to make memory cleanup easier
  wrt. freeing the File of a ROMImage which may not be created internally
  as with ROMImages merged from partial ones
- Minor formatting fix in ROMImage
- Mentioned that full ROMImages are required in description of Synth::open
2021-02-11 23:12:21 +02:00
sergm
5a44b4dc57 libmt32emu: fixed Cflags definition in the pkg-config file
that apparently advertised wrong directory, making all the public
headers global. This is never the intended way and the consumer application
is instead supposed to include headers from the library directory, likewise:

#include <mt32emu/mt32emu.h>
2021-02-10 19:18:56 +02:00
sergm
9b9a7d3388 Made shortName fields of partial ROMInfos distinct
so that they can still be used as identifiers of ROMImages
2021-02-07 11:51:33 +02:00
sergm
cfa8ab9eb8 In classes ROMInfo and ROMImage, added support for partial ROM images #44
- Added metadata describing raw bitwise ROM dumps from supported hardware
  models
- New overloaded methods enable finding a ROMInfo and creating a ROMImage
  for a given File and a subset of known ROMInfos, e.g. filtered by type
  and/or pairType
- New methods facilitate creation of a full ROM image from a couple
  of the respective partial ones
2021-02-07 10:03:30 +02:00
sergm
fdc24a2acd Symbol versioning for libmt32emu #46
Added support for documenting easily the exact library version
when a particular exported symbol was introduced. This will help
an application developer to quickly find the version requirements
yet adds a possibility to generate version map files automatically
for platforms that support symbol versioning.
2021-02-06 17:10:27 +02:00
sergm
eb3947b025 Slightly improved pkgconfig support for libmt32emu
- Introduced configuration option libmt32emu_PKGCONFIG_INSTALL_PREFIX.
  Because pkgconfig files reside outside the library directory on some
  systems, we have to allow the packager to specify pkgconfig prefix
  separately.
- The pkgconfig file is no longer included in Runtime packages with shared
  library, as is commonly adopted by popular Linux distros.
2021-01-30 23:14:26 +02:00
Dominik Reichardt
030495a8d9 Generate and install a pkg-config file (#43)
* Generate and install a pkg-config file

* revised the pkg-config template some more
2021-01-30 21:29:34 +02:00
sergm
f7a5ac8706 Further improved packaging of libmt32emu on Linux
When creating a Devel package for shared library in DEB and RPM formats,
the package name and resulting package file name are now adjusted
automatically (still, not splitting stuff into several cmake components).
2021-01-30 14:35:47 +02:00
sergm
b8e3518367 mt32emu_qt: Added required files for freedesktop integration 2021-01-30 11:02:08 +02:00
sergm
fd667b1c89 Unified the naming scheme for generated package files 2021-01-30 10:55:55 +02:00
sergm
29e9ff37ec Fixed software license information in generated RPM packages 2021-01-30 10:14:10 +02:00
sergm
2caba8b87c Improved cmake script of libmt32emu wrt. packaging
The advanced option libmt32emu_PACKAGE_TYPE is now possible to select
regardless whether a static or shared library is built. For static builds,
values Complete and Devel are identical but for Runtime, documentation
files are only added to the package.

This permits somewhat better build experience when using the top-level
CMakeLists.txt script. Specifically, it is now easy to omit development
files and build both components mt32emu_qt and mt32emu_smf2wav statically
linked with the library with just a single cmake command like

  cmake -Dlibmt32emu_PACKAGE_TYPE=Runtime .
2021-01-26 21:15:18 +02:00
sergm
7a941bdc32 Added a comment wrt. a workaround in cmake build script for OS/2 2021-01-26 21:03:23 +02:00
sergm
4f89ab15dc Bumped munt package version 2.4.0 munt_2_4_0 2021-01-17 20:02:51 +02:00
sergm
71a51f35fa Updated FreeBSD ports 2021-01-17 19:57:49 +02:00
sergm
2ec9dbb2bb Bumped versions:
- mt32emu 2.4.2
- mt32emu_qt 1.8.0
- mt32emu_smf2wav 1.6.0
- mt32emu_win32drv 1.6.0
mt32emu_win32drv_1_6_0 mt32emu_smf2wav_1_6_0 mt32emu_qt_1_8_0 libmt32emu_2_4_2
2021-01-17 15:16:00 +02:00
sergm
cbbf84a396 Bumped copyright year 2021-01-17 12:20:07 +02:00
sergm
59c7504815 Switched mt32emu-qt build to using native support for precompiled headers
if available in CMake
2021-01-10 16:07:50 +02:00
sergm
b83ae8edfb Updated references to README.txt -> README.md 2021-01-10 13:44:50 +02:00
sergm
785fb8cc37 Refreshed READMEs which are now provided in the markdown format 2021-01-09 21:59:59 +02:00
sergm
5f12440234 In mt32emu_smf2wav, added support for the two new synth properties
NicePanning and NicePartialMixing introduced with mt32emu release 2.4.0
2021-01-04 21:34:05 +02:00
sergm
254b0e55a3 In mt32emu_win32drv, added support for the two new synth properties
NicePanning and NicePartialMixing introduced with mt32emu release 2.4.0
2021-01-04 20:48:51 +02:00
sergm
7c142532b3 In mt32emu-qt, added support for the two new synth properties
NicePanning and NicePartialMixing introduced with mt32emu release 2.4.0
2021-01-03 16:14:01 +02:00
sergm
4c4295330d Nuked unnecessary explicit include statements from CMake modules
to suppress annoying warnings
2021-01-03 10:13:33 +02:00
sergm
bd185af1fd - Disabled unsupported MIDI recording function in exclusive
JACK MIDI sessions
- Disabled audio recording when the synth is stopped; stopping a synth
  that is recording audio now terminates the audio recording and closes
  the audio file
- Temporarily disabled unsupported audio recording for JACK
2020-12-20 18:55:49 +02:00
sergm
60b0ef6f4f Prevented potential crashes of mt32emu-qt when a MIDI message is pushed
to SynthRoute while the audioStream is being stopped
2020-12-20 17:36:22 +02:00
sergm
e92732007c Nuked seemingly unused include 2020-12-20 11:18:02 +02:00
sergm
6ae10989ff - Fixed AudioFileWriterStream being unable to do realtime audio capturing
with more than one MIDI session attached
- Fixed presumably broken cleanup in case write to the audio file fails
- Improved names of related methods, added a couple of comments
2020-12-20 10:40:24 +02:00
sergm
e1e398b435 Introduced helper method AudioStream::renderAndUpdateState
This method is now used in majority of audio drivers that simplifies
rendering loops or the callbacks yet ensures that all drivers invoke
the related operations in the right order.
2020-12-19 20:33:29 +02:00
sergm
27f7032cca Reconsidered API of AudioStream::estimateMIDITimestamp
We never actually rely on the default value of the argument,
and it is clearly better to catch MasterClock value early in a MIDI driver.
2020-12-19 19:18:12 +02:00
sergm
81bfae1c3d Minor code cleanup 2020-12-19 17:41:26 +02:00
sergm
2bd87d779a Added a missing include to QRingBuffer.h 2020-12-19 15:32:05 +02:00
sergm
ae7017a139 Reimplemented MidiRecorder
- It now allows recording from several MIDI sources simultaneously.
  When more than one MIDI session is attached to a Synth being recording
  MIDI, a standard MIDI file type 1 is created subsequently that contains
  recorded MIDI events of each session in a separate MIDI track, which may
  be helpful while editing the MIDI file further.
- It no longer blocks the MIDI driver thread for buffer reallocations.
- Along the way, fixed writing broken MIDI files when an unsupported
  MIDI message appeared. Also, fixed recording out-of-order MIDI messages
  with bogus timestamps.
2020-12-19 15:24:19 +02:00
sergm
7920ba07d6 Fixed broken utility method MidiEventLayout::alignSysexDataLength 2020-12-19 15:11:35 +02:00
sergm
02405c47cb Extracted some helper types from QMidiBuffer to MidiEventLayout for reuse.
Also improved compliance with standard C++.
2020-12-13 21:57:36 +02:00
sergm
f92c96a566 Extracted RealtimeLocker from QSynth for reuse elsewhere 2020-12-13 21:53:43 +02:00
sergm
97d5ebde32 Also added support for QAtomicPointer into QAtomicHelper for future use 2020-12-13 21:52:45 +02:00