Commit Graph

187 Commits

Author SHA1 Message Date
Max Horn
b9296a189e AUDIO: Expose ADPCM decoder internals via a new header
There are tons of ADPCM variants out there, and it is impractical to
stuff them all into a single adpcm.cpp file. By exposing the internals,
engines can implement their ADPCM decoder variants more easily.
2011-04-13 12:48:57 +02:00
Matthew Hoops
499753cbb8 AUDIO: Don't end the AAC stream if we still have buffered samples 2011-04-12 16:23:34 -04:00
Matthew Hoops
08b70fa1a7 AUDIO: Fix QuickTime/MPEG-4 seeking
MPEG-4 seeking was broken while QuickTime seeking was extremely slow. All is fixed now
2011-04-12 14:23:23 -04:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Matthew Hoops
368e0e47b5 AUDIO: Remove unused variables 2011-04-10 18:20:53 -04:00
Matthew Hoops
9d0e5a7132 ALL: Add/update some comments 2011-04-10 15:11:03 -04:00
Matthew Hoops
f9413e4dc2 AUDIO: Add support for AAC audio 2011-04-10 14:51:24 -04:00
Matthew Hoops
7c5dfaa04c COMMON: Parse the MPEG-4 esds atom 2011-04-08 22:46:19 -04:00
Matthew Hoops
faee277978 COMMON: Add a DisposeAfterUse flag to QuickTimeParser 2011-04-08 17:04:29 -04:00
Matthew Hoops
88ebf13077 AUDIO: Allow for seeking in a QuickTimeAudioStream 2011-04-08 10:54:13 -04:00
Matthew Hoops
8cf73e3fb4 AUDIO: Split QuickTime audio into a new class
Standalone QuickTime files can now be played as an AudioStream
2011-04-07 19:40:07 -04:00
Max Horn
8c931fd1e8 AUDIO: Add Audio::MidiPlayer::createDriver(), let some engines use it 2011-03-28 18:06:36 +02:00
dhewg
b8a118eb0c ANDROID: Use the midi gain option for EAS 2011-03-27 15:30:17 +02:00
dhewg
153e67b37c ANDROID: Maybe working support for EAS DLS soundfonts 2011-03-26 11:54:17 +01:00
dhewg
703af39be5 ANDROID: Add code to dump the EAS stream to a file 2011-03-26 11:11:32 +01:00
dhewg
41762892e0 ANDROID: Fix MIDI packet size
Instruments are now not reset to the grand piano due to trailing
zeroes.
Thanks to waltervn for noticing this.
2011-03-26 11:11:17 +01:00
Max Horn
6cc0aca5b2 AUDIO: Document issues with semantics of Audio::MidiPlayer::isPlaying() 2011-03-25 17:01:36 +01:00
dhewg
0e6cdfd675 ANDROID: Experimental MIDI Driver
Based on the SONiVOX® Embedded Audio Synthesis (EAS™) library, which is
part of the base Android OS.

CPU stats (Cortex A8 1GHz, monkey1 intro, peak values):
MAME OPL: 30%
DosBox OPL: 26%
EAS: 19%
2011-03-25 14:43:52 +01:00
Max Horn
7949d7c6de AUDIO: Move more common code to Audio::MidiPlayer
This also should fix some regressions from the previous
commits, related to MidiParser's either being leaked,
or being deleted and then used again (i.e., crashing).

I tested as many games as I had available, but further
testing of all affected engines is called for anyway.
2011-03-25 14:15:53 +01:00
Max Horn
db3802b021 AUDIO: Whitespace fix 2011-03-25 14:15:52 +01:00
Max Horn
61ff5de0cf AUDIO: Rename 'channel' to 'ch' 2011-03-25 14:15:51 +01:00
Max Horn
62f5c475f3 AUDIO: Expand MidiPlayer docs / goals a bit, mention deadlock bug 2011-03-24 16:49:46 +01:00
Max Horn
e9570c3a4b AUDIO: Added Audio::MidiPlayer class
This code is currently not complete, but contains enough code to
allow several engines to switch their pseudo MidiDrivers to be
based on this class, greatly reducing code duplication.
2011-03-24 16:46:46 +01:00
Max Horn
c70c8864f1 AUDIO: Introduce a new MidiDriver_BASE base class.
The actual MidiDriver derives from it. MidiDriver_BASE only
provides the minimal API necessary for transmitting MIDI data.
The idea is that this is all MidiParser needs, thus allowing
us to simplify the various MidiPlayer classes in our engines.
2011-03-23 15:25:47 +01:00
Max Horn
a539be098d AUDIO: Update some comments, remove some obsolete ones 2011-03-23 15:25:47 +01: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
dhewg
bb12acfa0f AUDIO: Cleanup
Is it just me or is overwriting-but-not-marking-as-virtual
irritating?
2011-03-22 21:02:08 +01:00
dhewg
2def212de7 ALL: s/PI/M_PI/
Tip of the day: git grep -w PI
2011-03-19 11:24:06 +01:00
md5
a6aacc73e2 AUDIO: Changed several places that use PI to use M_PI instead 2011-03-19 02:30:32 +02:00
dhewg
3d576c184a AUDIO: Fix some whitespaces 2011-03-11 20:54:57 +01:00
dhewg
a2a5083dc9 AUDIO: Work around ARM code volume limits
The ARM specific rate converters work with 8bit volume vars. Limit
volumes to 0xff to prevent crackling.
2011-03-11 20:54:52 +01:00
md5
87d7044a3f AUDIO: Removed comment about MDT_PREFER_MT32 and the MT-32 emulator 2011-03-01 12:24:28 +02:00
md5
4a5b30e21f MIDI: Updated documentation on MDT_PREFER_MT32 and MDT_PREFER_GM 2011-03-01 10:32:17 +02:00
dhewg
bea57f6950 AUDIO: Make mixCallback return the sample count
The RateConverter::flow result was never used, pipe it through
Channel::mix to MixerImpl::mixCallback, so backends can decide
if they want to waste cpu cycles while playing empty buffers.
2011-02-27 09:04:36 +01:00
Johannes Schickel
fb71d66e97 MT32: Adapt to setPalette RGBA->RGB change. 2011-02-14 17:08:33 +01:00
Johannes Schickel
87c81566b4 AUDIO: Fix assertion triggered by SubSeekableAudioStream constructor.
This assertion was introduced with 633b8ed277. I change the code to first
convert all parameters to the audio stream's framerate to avoid a possible use
of operator- on two AudioTimestamps with different framerates.
2011-02-13 22:07:34 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00