Commit Graph

344 Commits

Author SHA1 Message Date
D G Turner
3bcc3a6849 AMIGAOS: Minor change to replace strcpy usage with safer strlcpy. 2014-03-22 01:13:45 +00:00
raziel-
22634d18ba AMIGAOS: Update CAMD midi to use output port environment variable.
If this is not present, it will use the default as previously.
2014-03-22 01:13:45 +00:00
Johannes Schickel
449ea100d9 WIN32: Make GPL headers consistent in themselves. 2014-02-18 02:39:40 +01:00
Johannes Schickel
121687d2ed BACKENDS: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Dmitry Smirnov
61b4981b12 BACKENDS: fix FTBFS on GNU Hurd by replacing MAXHOSTNAMELEN with NI_MAXHOST
Bug-ScummVM: https://sourceforge.net/tracker/?func=detail&atid=418820&aid=3614268&group_id=37116

See more in similar http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387665
2013-06-18 02:52:35 +10:00
Willem Jan Palenstijn
34c36d8f8f AUDIO: Remove useless check 2013-04-23 21:25:03 +02:00
Matthew Hoops
31252e1095 MACOSX: Fix compilation with the 10.2.8 SDK
This is a pretty bad hack of not using the kMusicDeviceProperty_SoundBankFSRef symbol and using its value instead. It felt wrong breaking 10.2.8 support just because of Soundfonts.
2013-02-01 16:48:38 -05:00
Matthew Hoops
412ac740aa MACOSX: Load soundfonts using FSRef instead of FSSpec on 10.5
Fixes bug #3602452
2013-02-01 14:15:10 -05:00
Matthew Hoops
23cc4e89f3 BACKENDS: Remove excess space from warnings 2012-11-24 18:19:05 -05:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Matthew Hoops
065b996d15 MACOSX: Make failing to load a soundfont in CoreAudio fatal
If we don't bail out, CoreAudio will explode.
2012-09-17 20:38:33 -04:00
Matthew Hoops
486f04b761 MACOSX: Fix soundfont loading with CoreAudio on newer versions of Mac OS X 2012-09-14 09:50:45 -04:00
Jonathan Gray
8cfe25cd65 MIDI: add sndio midi backend
New sndio MIDI backend for OpenBSD written by Alexandre Ratchov.
Tested with an external MT-32 and fluidsynth.
2012-05-15 16:39:21 +10:00
Johannes Schickel
223794fb38 ALL: Make use of defined() for the preprocessor consistent.
This does not change the use of defined for some NDS source files, since they
seem to be (based on?) third party code.
2012-03-17 22:02:44 +01:00
athrxx
535a55e47a AUDIO: (Windows) fix issue with non-unique MIDI device names
This should fix the issue mentioned here: http://forums.scummvm.org/viewtopic.php?t=11255

Apparently Windows doesn't generate unique names for MIDI devices of the exact same type.
I do not know whether this could be a problem on other backends, too.
2012-02-25 14:15:49 +01:00
Oystein Eftevaag
78baa27e0e MACOSX: Moved an include a bit to make sure that some defines are there before they are actually used. 2012-01-17 15:19:54 -05:00
Oystein Eftevaag
ba1396954d MACOSX: Changed CoreAudio deprecation check slightly to allow building with older SDKs 2012-01-14 12:12:10 -05:00
Max Horn
ad1c2a45f1 MACOSX: Default to new CoreAudio API on x86, and to old on PowerPC
The new API has been present since Mac OS X 10.5 (released four years ago,
in October 2007), and also since iOS 2.0 (thus, the iOS port may be able to
use it, too). Moreover, 10.5 was the last system to support PowerPC.
2012-01-14 19:36:24 +01:00
Filippos Karapetis
d6ee5988d2 Merge pull request #137 from fingolfin/various-cleanup
Various cleanup
2011-12-13 03:12:43 -08:00
Max Horn
9095de4674 MACOSX: Optionally allow building against "new" (10.5+) CoreAudio API
This silences a bunch of deprecation warnings when compiling on any current
system. Moreover, the new API is available on the iPhone, so perhaps this
is interesting for the iPhone port, too.

On the long run, ScummVM will have to switch to the new API, as Apple
will eventually drop the old one.
2011-12-12 16:46:50 +01:00
Max Horn
fe79ce5038 AUDIO: Add endian FIXME to timdity code 2011-12-12 16:27:41 +01:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
eriktorbjorn
3e8a7afeae CAMD: Added _isOpen checks to send() and sysEx()
At Raziel^'s request. This is the same as the ALSA checks I added
earlier today.
2011-05-08 13:08:09 +02:00
eriktorbjorn
3b2c3907a0 ALSA: Warn if events or SysEx messages are received when not open.
This should make it easier to spot errors like the one spotted in
the Queen engine yesterday. The Windows MIDI driver already seems
to do something like this; I don't know about the others.
2011-05-08 07:34:46 +02:00
Joost Peters
e28b402295 IRIX: Fix compilation 2011-05-08 01:25:09 +02:00
Max Horn
28403e4543 BACKENDS: Fix copy & paste mistakes in some comments 2011-05-04 16:18:18 +02:00
Hubert Maier
79b45cf535 AMIGAOS: Fix CAMD compiler warning 2011-04-29 14:08:49 +03:00
Alyssa Milburn
d5207ed6ea fix AmigaOS 4 build (thanks to Raziel^) 2011-04-29 11:47:49 +02:00
Max Horn
a0fc266c82 MACOSX: Fix compilation 2011-04-28 15:55:41 +02:00
Paul Gilbert
c6fa23a3d1 JANITORIAL: Add in necessary include files to fix compilation in MSVC 2011-04-28 22:32:12 +10:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
Johannes Schickel
ff9653ddea ALSA: Fix formatting. 2011-03-10 04:45:06 +01:00
Johannes Schickel
601a09e417 ALSA: Work around a firmware bug in USB-MIDI cables.
Thanks to waltervn (and wjp) for their investigation on this and Walter's SCI
specific workaround which I more or less just copied here so it will apply for
all engines.
2011-03-10 04:40:30 +01:00
Johannes Schickel
40e9374679 ALSA: Strip trailing spaces in device name.
This might fix odd problems when storing the device name in the config file,
when the name ends with a space by chance.
2011-03-10 02:54:32 +01:00
Max Horn
77fe90d95e MIDI: Really fix bug #3153076 (this time also for Timidity)
svn-id: r55857
2011-02-09 11:03:36 +00:00
Max Horn
ab78737abd MIDI: Fix bug #3153076 (warnings in SEQ driver)
svn-id: r55851
2011-02-09 01:11:58 +00:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Filippos Karapetis
cc9f2944ed MIDI: Fixed unnecessary casts of return values to void, reported in bug #3153076
svn-id: r55248
2011-01-15 09:43:02 +00:00
Johannes Schickel
a1d99836cd BACKENDS: Fix SVN keyword usage.
svn-id: r54584
2010-11-29 18:48:43 +00:00
Max Horn
4bed2b3ff5 SDL: Trying to cleanup the FORBIDDEN_SYMBOL situation
svn-id: r54575
2010-11-29 16:35:29 +00:00
Max Horn
df05ed1a46 BACKENDS: Include scummsys.h at top of all .cpp files, *before* any #ifdefs
svn-id: r54573
2010-11-29 16:18:43 +00:00
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00
Johannes Schickel
3b81a9489e SOUND: Allow TiMidity support to be disabled via configure.
svn-id: r53395
2010-10-13 00:48:40 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Torbjörn Andersson
bbd3f0dbb3 ALSA: Be more intelligent when picking MIDI port
Often, a client has more than one available port. Pick the first one
that isn't already in use. For instance, on my computer client 17 is
the "Emu10k1 WaveTable", and it has four available ports. If, say,
aplaymidi is already playing on port 17:0, ScummVM will use port 17:1
instead. Otherwise the two programs will mess up each others
instruments and controller settings.

Of course, in reality I doubt that anyone will run two different MIDI
playing applications at once.

svn-id: r51380
2010-07-27 17:18:02 +00:00
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