Commit Graph

345 Commits

Author SHA1 Message Date
Torbjörn Andersson
47f93e9d07 ALSA: Tweak capability and type flags for the MIDI port
This keeps ScummVM's own port from being included in the list of
available MIDI devices.

svn-id: r51378
2010-07-27 16:35:28 +00:00
Johannes Schickel
2db4e71b66 ALSA: Simplify device querying code.
Thanks to eriktorbjorn for some quick testing.

svn-id: r51366
2010-07-27 13:01:10 +00:00
Torbjörn Andersson
5b3f31feec General: Fixed building the SEQ MIDI driver
An #include was missing, causing the driver to never be built. Also fixed what
looked like a cut-and-paste error in generating the features string.

svn-id: r51056
2010-07-20 08:56:53 +00:00
Max Horn
37aa8a7499 BUILD: Unify adding -DUNIX to DEFINES; complete SEQ MIDI detection
* Added a yes/no variable _unix to configure, which controls when
  -DUNIX is added to DEFINES
* Enable SEQ MIDI via _seq_midi by default on UNIX type systems,
  except for those which override that.
* Switch SEQ MIDI code to check #define USE_SEQ_MIDI
  (alternatively, we could compile it only conditionally...)

svn-id: r51055
2010-07-20 08:25:13 +00:00
Max Horn
211fcfe7ba MIDI: Build and use ALSA driver if and only if USE_ALSA is defined
svn-id: r51053
2010-07-20 08:24:34 +00:00
Torbjörn Andersson
abae29a2dc ALSA: Get ALSA port settings from the new device config settings.
This is also an attempt to make the transition from the old settings to the
new ones a little less rough, by trying to put something sensible into the
first device, which is what's used by default. Currently it prefers 17:x
and 65:x since they're the old defaults, followed by 128:x since that's
probably TiMidity.

The old SCUMMVM_PORT environment variable still overrides any config
settings. I haven't made up my mind whether or not that's a good idea, but
at least it prints a warning message.

TODO: The old 'alsa_port' setting is not handled. It should probably be
used to set sensible defaults for the new settings, but I'm not sure where
this should be done.

TODO: The documentation will need to be updated, once everything is working
the way it should.

svn-id: r51019
2010-07-19 07:47:11 +00:00
Torbjörn Andersson
75dd75a737 SUBSYSTEM: ALSA music driver
We should probably open the sequencer the exact same way, both when
opening the driver and when asking it for available MIDI devices. Not
that I've been able to figure out the difference between "hw" and
"default" from the fine ALSA manual...

And I'm not sure we really need to try and keep compatibility with
ancient (pre-0.9.0?) ALSA any longer...

svn-id: r51014
2010-07-19 05:30:40 +00:00
Max Horn
0b48a71c99 Remove PalmOS port
svn-id: r50964
2010-07-17 18:41:38 +00:00
Torbjörn Andersson
bc0c306110 If the ALSA driver hasn't been opened, closing it should do nothing. This keeps
ScummVM from crashing if, for instance, someone accidentally closes the driver
twice.

svn-id: r50870
2010-07-14 04:33:35 +00:00
Angus Lees
bb300ec671 Skip /dev/sequencer MIDI on Android.
svn-id: r50664
2010-07-05 00:09:41 +00:00
Johannes Schickel
09b4f7cbed Define WIN32_LEAN_AND_MEAN before including windows.h.
This will cause our code to include less functionality, but might on the other hand fasten up the compilation.

svn-id: r50346
2010-06-26 21:55:52 +00:00
Jordi Vilalta Prat
063cef0c28 GUI: Add and improve some messages to translate
svn-id: r50324
2010-06-26 15:48:03 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +00:00
Johannes Schickel
caf31ee5af Replace various strncpy usages by strlcpy.
svn-id: r48955
2010-05-05 17:54:12 +00:00
Max Horn
0e0e11e641 Fix warnings
svn-id: r48277
2010-03-18 15:04:57 +00:00
Arnaud Boutonné
b14396edf2 Replace header by a standard header
svn-id: r47449
2010-01-22 23:56:25 +00:00
Torbjörn Andersson
72eb9ec9ea Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary.

svn-id: r46941
2010-01-03 19:37:43 +00:00
Max Horn
84f3c98fad Remove the Audio::Mixer parameter from the midi/music plugins
svn-id: r46315
2009-12-09 18:05:20 +00:00
Max Horn
76132409d6 Removed Mac OS X QuickTime MIDI backend. It breaks on OS X 10.6, and it's not as good as the CoreAudio backend anyway
svn-id: r44428
2009-09-27 22:43:32 +00:00
Max Horn
6ec05c48f9 Fix CoreAudio MIDI backend on Mac OS X 10.6
svn-id: r44427
2009-09-27 22:42:51 +00:00
Bertrand Augereau
d454c9b379 Minor constness fixes
svn-id: r43974
2009-09-06 10:51:20 +00:00
Johannes Schickel
1431944294 Add GCC_PRINTF parameter.
svn-id: r42104
2009-07-04 18:54:06 +00:00
Max Horn
531e7a8c78 Silenced the reamining warnings reported in patch #2684986 (gcc warnings with -DFORTIFY_SOURCE=2 -fstack-protector)
svn-id: r41930
2009-06-28 19:56:58 +00:00
Torbjörn Andersson
0999534749 The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
2009-05-31 10:02:16 +00:00
Filippos Karapetis
ca330071be Fixed compilation error
svn-id: r41037
2009-05-30 17:06:30 +00:00
Max Horn
a3efc5611c Fixed various GCC 4.2 warnings, among them an actual longstanding bug (3 years :) in the quicktime midi code
svn-id: r40577
2009-05-14 23:09:04 +00:00
Johannes Schickel
b9ac179b2e Silence another g++ 4.4 warning.
svn-id: r40527
2009-05-13 17:33:58 +00:00
Johannes Schickel
931c8c27e2 Fix parameter in Windows MIDI backend (this is according to API documentation from M$).
svn-id: r39556
2009-03-20 00:20:29 +00:00
Max Horn
ffa97e6626 Patch #2658665: Implement getDevices() in backends/midi/dmedia.cpp
svn-id: r39437
2009-03-16 04:15:03 +00:00
Max Horn
eb5ec2369f #define usleep on BeOS
svn-id: r36201
2009-02-02 18:33:38 +00:00
Eugene Sandulenko
696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Johannes Schickel
b12ebf7218 Fixed sysEx buffer sizes.
svn-id: r35192
2008-11-30 13:03:43 +00:00
Johannes Schickel
2ebe04ac3e - Extended MidiDriver::sysEx to allow 264 byte sysEx messages
- Updated all drivers to allow 264+2 byte sysEx messages
- Implemented sysEx processing for MT-32 for Kyra1 and HoF. MT-32 should now be working properly.

svn-id: r35180
2008-11-30 04:42:30 +00:00
Max Horn
f32be87633 Turned enum PluginError into Common::Error, which in the future is to be used in more places. Help with this is highly welcome
svn-id: r34906
2008-11-05 17:24:56 +00:00
Max Horn
31320430de Partial commit of patch #2012839: Atari Patch for adding Native MIDI and Fix Compile
svn-id: r34194
2008-08-27 18:52:21 +00:00
Torbjörn Andersson
4e66938e8c Committed my patch #2026097 ("ALSA: Try both 65:0 and 17:0 by default"), with a
slight modification to the README changes. (I don't know how to interpret all
the output from aconnect, so I'm only documenting "the most important bit".)

svn-id: r33648
2008-08-05 21:43:10 +00:00
Max Horn
0860df5d0e Fixed code formatting
svn-id: r33056
2008-07-14 07:54:18 +00:00
Jordi Vilalta Prat
256036d4af Fixed ALSA's invalid port error message
svn-id: r32698
2008-06-14 04:52:10 +00:00
Jordi Vilalta Prat
8eac356946 Added initial interface to list music devices and their types
svn-id: r32695
2008-06-13 16:04:43 +00:00
Jordi Vilalta Prat
177993b145 Renamed MIDI plugins to Music plugins
svn-id: r32693
2008-06-13 14:30:47 +00:00
Max Horn
8d0766f4f7 Hack to disable 'depracted' warnings on OS X 10.5
svn-id: r32173
2008-05-18 17:20:59 +00:00
Max Horn
ebe1009335 Fixed QuickTime MIDI plugin
svn-id: r32127
2008-05-14 21:28:55 +00:00
Jordi Vilalta Prat
eb6c809d2b - Added more information (ID and capabilities) to the MIDI drivers
- Added the MidiPlugin interface to the remaining MIDI drivers
- Added an initial MidiManager to handle the MIDI plugins (just static plugins by now)

svn-id: r32117
2008-05-14 14:56:29 +00:00
Jordi Vilalta Prat
d942fd42bb Moved midiplugin.h to sound/ since it will be used for more than just the native MIDI drivers.
svn-id: r32097
2008-05-14 05:47:29 +00:00
Max Horn
d123c67174 Fix QuickTime MIDI driver compilation
svn-id: r32038
2008-05-11 21:28:51 +00:00
Filippos Karapetis
d6fafb4ad1 Fixed compilation under windows
svn-id: r32010
2008-05-11 10:52:58 +00:00
Jordi Vilalta Prat
d696ed6ea2 Added the MidiPlugin interface (first step towards the MIDI plugins)
svn-id: r31993
2008-05-11 02:10:05 +00:00
Johannes Schickel
600ab40bca Changed all delete [] usages to delete[].
svn-id: r31927
2008-05-07 14:31:45 +00:00
Max Horn
05b159609b Removed remaining traces of the dead MorphOS backend, which itself was removed about one year ago
svn-id: r31114
2008-03-12 18:42:47 +00:00
Max Horn
b434f189bc Switched CoreAudio MIDI driver to use AudioUnit v2 API (results in better Leopard support/performance, it seems, at least in Exult)
svn-id: r31113
2008-03-12 18:38:03 +00:00
Jordi Vilalta Prat
065f8f5419 Automatic device detection for CAMD.
svn-id: r30911
2008-02-20 19:35:00 +00:00
Jordi Vilalta Prat
672a508bdd Added CAMD MIDI driver for AmigaOS4
svn-id: r30910
2008-02-20 17:07:58 +00:00
Jordi Vilalta Prat
d6c34bdc4b Fixed the spaces before tabs.
svn-id: r30667
2008-01-28 00:14:17 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Max Horn
2222b947ba WORKAROUND bug #1870304: Solaris does not provide INADDR_NONE
svn-id: r30467
2008-01-13 12:54:13 +00:00
Max Horn
33b2a4083d Fix dmedia.cpp to not use stdafx (likely fixes building on IRIX)
svn-id: r30151
2008-01-02 13:31:16 +00:00
Torbjörn Andersson
ceffb6d2be Changed "if( ... )" to "if ( ... )" and "while( ... )" to "while ( ... )", and
removed an unnecessary \n.

svn-id: r29379
2007-11-02 16:55:09 +00:00
Max Horn
8eb73f2694 Patch #1815526: Add TiMidity++ MIDI server support
svn-id: r29377
2007-11-02 16:01:52 +00:00
Max Horn
5a07c3c552 Patch #1804801: DMedia MIDI driver for IRIX
svn-id: r29142
2007-09-30 12:12:22 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
4cc9d17c34 Adding various FIXME comments to bogus (non-self-explanatory) existing FIXME comments; and some other related cleanup
svn-id: r28890
2007-09-11 09:20:39 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Chris Apers
532311576e Fixed compilation
svn-id: r26698
2007-05-01 09:58:44 +00:00
Chris Apers
3aee6e3f8e Fixed sysEx function
svn-id: r26696
2007-05-01 09:51:53 +00:00
Nicola Mettifogo
1e985051a9 reduced dependency from windows-specific header files
svn-id: r26034
2007-03-09 00:13:07 +00:00
Max Horn
eeda548204 Explicitly #include fcntl.h and unistd.h for the open/write/close syscalls
svn-id: r26026
2007-03-08 20:42:40 +00:00
Max Horn
8778f121e2 Replaced uses of fprintf() with warning() or error()
svn-id: r26022
2007-03-08 17:23:19 +00:00
Max Horn
4db72c8762 Unified how we deal with (and how we generate) MIDI sysex messages -- in particular, we now always do so w/o framing the message (documented this with a Doxygen comment in the MidiDriver class)
svn-id: r25630
2007-02-16 13:30:41 +00:00
Torbjörn Andersson
a3ea44fd48 Some updates (mostly guesswork) for the ALSA MIDI driver, mostly prompted by
Waxworks (Simon engine). See http://www.borg.com/~jglatt/tech/midispec.htm for
reference.

* Added case for Aftertouch (Key Pressure).

* Changed Channel Pressure to flush the event immediatley. The message could
  apply to notes while they are playing.

* Downgraded the error for unknown MIDI messages to a warning, and clarified it
  slightly.

svn-id: r23949
2006-09-20 17:16:58 +00:00
Chris Apers
8922513d9f Fixed compilation
svn-id: r23913
2006-09-17 10:08:16 +00:00
Max Horn
04709491f7 Avoid using exceptions
svn-id: r21894
2006-04-14 23:21:59 +00:00
Max Horn
e4930bd96d Don't use HAVE_CONFIG_H / config.h directly, use scummsys.h instead
svn-id: r21605
2006-04-04 21:45:13 +00:00
Max Horn
8cdee5a931 Do not #include endian.h in scummsys.h (cuts down deps on endian.h from ~400 to ~250). Many greetings to eriktorbjorn, and have fun recompiling.
svn-id: r21500
2006-03-29 15:59:37 +00:00
Oystein Eftevaag
c3d8674a26 Adds support for building on Intel Macs, using a modified
version of patch 1448395 by Aubin and some of my 
own changes.

Notably:
* Two elements of a struct in backends/midi/quicktime.cpp
needed to be forced to BE.
* NASM set to build Mach-O binaries
* configure now checks for Altivec support on Darwin hosts,
instead of assuming it. Altivec support can also be disabled (not 100% sure if t
his is actually needed, but might be handy for crosscompiling).
* The aliasing of the symbols contained in the .asm files
done on Windows were also needed on MacOS.

Note that while the asm code is properly compiled and linked
in, HQ2/3x support will still not work properly on Intel macs
if NASM is enabled.

svn-id: r21280
2006-03-14 12:18:04 +00:00
Eugene Sandulenko
233c2a42f9 WIP of maemo port
svn-id: r21055
2006-03-04 01:32:04 +00:00
Torbjörn Andersson
278d0de012 Fixed compilation.
svn-id: r20953
2006-02-27 07:18:49 +00:00
Jamieson Christian
2469e00248 SysEx data now passed around with const pointers. Permits simplification of some SysEx client code.
Testing on Windows. Developers on other platforms, please verify integrity of music handling in your respective MidiDrivers.

svn-id: r20952
2006-02-27 01:59:07 +00:00
Willem Jan Palenstijn
2d2258f596 clear ALSA event structure before use
svn-id: r20951
2006-02-27 00:01:29 +00:00
Max Horn
a161b09728 Moved dummy MIDI driver from backends/ to sound/ (this fixes bug #1435221)
svn-id: r20878
2006-02-25 14:45:31 +00:00
Chris Apers
0a5cd1ce98 Disable Adlib on PalmOS 68k devices
svn-id: r20575
2006-02-11 19:01:06 +00:00
Max Horn
cbb2ca005c Change CVS keywords to SVN keywords
svn-id: r20535
2006-02-11 12:47:47 +00:00
Max Horn
0ad58cdb95 Removed .cvsignore files
svn-id: r20424
2006-02-07 22:50:14 +00:00
Eugene Sandulenko
ea42bad781 Update copyright notice
svn-id: r20088
2006-01-18 17:39:49 +00:00
Max Horn
549c6ea871 Fixed the CoreMIDI driver -- MT-32 now sounds perfect under Mac OS X :-)
svn-id: r19860
2005-12-30 14:41:25 +00:00
Max Horn
93bef2e0be Switched the CoreAudio driver to use an AUGraph; this simplifies things a lot and should also cope with the user switching the default output device while ScummVM is running
svn-id: r19835
2005-12-26 20:54:24 +00:00
Max Horn
fcf1af2ffc New CoreMIDI midi backend for OS X
svn-id: r19832
2005-12-26 11:18:25 +00:00
Jonathan Gray
25794c23e2 Default to /dev/sequencer before /dev/null if no MIDI device
is specified.

svn-id: r19480
2005-11-06 01:23:40 +00:00
Eugene Sandulenko
b36677af71 Update FSF address. Eek. Actually that took place on May 1, 2005
svn-id: r19142
2005-10-18 01:30:26 +00:00
Eugene Sandulenko
6b4484472b Remove trailing whitespaces.
svn-id: r18604
2005-07-30 21:11:48 +00:00
Max Horn
8a59ff208c Fix more GCC 4.0 warnings
svn-id: r18533
2005-07-11 00:48:27 +00:00
Max Horn
bf507bfa11 cleanup
svn-id: r18484
2005-07-02 13:01:59 +00:00
Max Horn
9d00744954 Small fixes
svn-id: r18483
2005-07-02 12:54:53 +00:00
Max Horn
7970562356 Hackish native MIDI HW support for Mac OS X (incomplete)
svn-id: r18481
2005-07-02 12:52:30 +00:00
Max Horn
8b1d7b9166 When including files from common/, explicitly use the common/ prefix
svn-id: r18444
2005-06-24 15:23:51 +00:00
Max Horn
28e40b33a7 Add a comment regarding use of CoreAudio/AudioUnits v1 API
svn-id: r17916
2005-05-05 11:57:52 +00:00
Max Horn
3ea96a13a0 If we don't want to use reverb, then at least disable it properly, not via a bad hack
svn-id: r17671
2005-04-18 18:02:07 +00:00
Max Horn
5c48717dd2 Remove some more header dependencies
svn-id: r16530
2005-01-10 22:35:43 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Max Horn
fec3df2096 Moved the softsynth midi drivers into a sound/softsynth; amongst other things, this fixes bug #1083058
svn-id: r16316
2004-12-25 18:34:44 +00:00
Max Horn
f09293b22c Clean up OSystem::Event
svn-id: r15990
2004-12-05 17:42:20 +00:00