aboutsummaryrefslogtreecommitdiff
path: root/audio
AgeCommit message (Collapse)Author
2014-01-27Revert "AUDIO: Simplify MidiTracker::processEvent return value"Alyssa Milburn
MI2 deletes the parser object(!) so we can't access any member variables here. Thanks to athrxx for finding this. This reverts commit 86c2fe47e04449602e4c005fa0a9c183bc8bba39 and adds a comment explaining why.
2014-01-27Revert "AUDIO: fix invalid mem access in midiparser.cpp"Alyssa Milburn
This broke SCI, since it doesn't call processEvent any more. This reverts commit afa54072a9622d7a370846bf280016843dc61009.
2014-01-26AUDIO: fix invalid mem access in midiparser.cppathrxx
(this caused a crash in MI2)
2014-01-17Merge pull request #417 from digitall/STACK_fixesJohannes Schickel
ALL: Fix optimization unstable code on checking for null after new.
2014-01-16AUDIO: Cleanup MT-32 code a bit.Johannes Schickel
This removes overwrites in ReportHandlerScummVM which are simply the default implementation anyway. A side effect is that this silences/fixes a warning about the former onProgramChanged to hide an virtual method due to parameter differences.
2014-01-16AUDIO: Register EAS sound driver as plain sound type.Johannes Schickel
MIDI code will control volume via MIDI events thus the generated audio should not be affected by mixer sound volumes. The initial commit 0e6cdfd67580f75e912c5e92abb26821d032f74b added it as music sound type. Might be copied from the (also) incorrect FluidSynth code.
2014-01-16AUDIO: Register FluidSynth driver as plain sound type.Johannes Schickel
MIDI code will control volume via MIDI events thus the generated audio should not be affected by mixer sound volumes. The initial commit(s) in d4d045b1174b4a48659f39f026ade42684b679bf / 13dc149ded691e718905049990dd0220230c500e added it as music sound type. So, this seems to be a long standing issue.
2014-01-16AUDIO: Register MT-32 emulator as plain sound type.Johannes Schickel
Formerly the audio stream was registered as sfx. This is incorrect behavior since the client code will control music volume with MIDI events on its own. It seems 67b311713d8f4cfcd460a9649e0075f24278a048 introduced this very long ago. This should fix unintended coupling of sfx volume and music volume in BASS.
2014-01-15ALL: Remove optimization unstable code on checking for null after new.D G Turner
These issues were identified by the STACK tool. By default, the C++ new operator will throw an exception on allocation failure, rather than returning a null pointer. The result is that testing the returned pointer for null is redundant and _may_ be removed by the compiler. This is thus optimization unstable and may result in incorrect behaviour at runtime. However, we do not use exceptions as they are not supported by all compilers and may be disabled. To make this stable without removing the null check, you could qualify the new operator call with std::nothrow to indicate that this should return a null, rather than throwing an exception. However, using (std::nothrow) was not desirable due to the Symbian toolchain lacking a <new> header. A global solution to this was also not easy by redefining "new" as "new (std::nothrow)" due to custom constructors in NDS toolchain and various common classes. Also, this would then need explicit checks for OOM adding to all new usages as per C malloc which is untidy. For now to remove this optimisation unstable code is best as it is likely to not be present anyway, and OOM will cause a system library exception instead, even without exceptions enabled in the application code.
2013-11-03AUDIO: Do not add extrapath to SearchMan in MT-32 emu code.Johannes Schickel
At the point where the emulator is created extrapath should already been added to extrapath. If not, the check in checkDevice already failed and thus adding it would be too late anyway. It seems this was added in 805b21181ab7138da6960ade703b25716120fc29. The comment about it being a HACK has been removed in bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3 but it's not clear to my why... At any rate, this should not be here.
2013-09-24MT-32: Update to munt 1.3.0Filippos Karapetis
2013-09-21AUDIO: Simplify SCI inFastForward flag by moving it to MidiParserWillem Jan Palenstijn
2013-09-21AUDIO: Simplify MidiTracker::processEvent return valueWillem Jan Palenstijn
2013-09-21AUDIO: Let jumpToTick use processEvent tooWillem Jan Palenstijn
2013-09-21AUDIO: Split event processing from MidiParser::onTimerWillem Jan Palenstijn
This is to prepare for overriding more of this functionality in SCI.
2013-08-21MT-32: Sync with the latest changes in muntFilippos Karapetis
2013-07-18Merge pull request #353 from clone2727/eventrec_timer_fixEugene Sandulenko
ALL: Don't use EventRecorder at all when not compiled in
2013-07-14JANITORIAL: Remove trailing whitespaceSven Hesse
2013-07-06ALL: Don't use EventRecorder at all when not compiled inMatthew Hoops
2013-07-06AUDIO: Further fix to ReportHandlerScummVM::printDebug in MT32 code.D G Turner
2013-07-04AUDIO: Fix ReportHandlerScummVM::printDebug in MT32 code.Johannes Schickel
Formerly it tried to pass 'va_list' as '...' to debug. Now it's first creating a String containing the output via String::vformat and then passing it to debug. Found by buildbot (master-dc). The warning message was: audio/softsynth/mt32.cpp:65: warning: cannot pass objects of non-POD type `struct va_list' through `...'; call will abort at runtime
2013-07-04Merge pull request #331 from sev-/gsoc2012-eventsrecorderEugene Sandulenko
GSoC2012: Event Recorder (reworked)
2013-07-02AUDIO: Support 96kHz audio rates.Alyssa Milburn
2013-07-02MT-32: Sync with the latest changes in muntFilippos Karapetis
This syncs our code with munt commits 258cd89 and 17b40a6
2013-05-17AUDIO: Reduce callback frequency of the MT-32 emulator.Johannes Schickel
Formerly the frequency was at 10000Hz. This resulted in 3,4 or even only 1 sample to be generated between callbacks on my system. All the other MIDI drivers use a much lower frequency here. The MidiDriver_Emulated subclasses use a frequency of 250Hz (by default) and the MidiDriver_MPU401 subclasses (which are for example the ALSA output) use 100Hz. With the new frequency of 250Hz 128 samples are generated between callbacks. This will hopefully reduce the overhead of the MT-32 emulator (the engine's code was run 10000 times a second too) a bit. I talked with KingGuppy and it seems the value was increased in the past (still with the very old MT-32 emulator code) because there were accuracy issues. However, I gave the lower frequency a quick test with the MI1, MI2 and ITE intro and didn't spot any obvious differences. As a result, KingGuppy and I agreed to lower it back to 250Hz. If there are any problems coming up we can still slightly increase the frequency to 1000Hz for example. Thanks to waltervn for noticing this. Thanks to KingGuppy for discussion.
2013-05-17RECORDER: Implement Events RecorderEugene Sandulenko
2013-05-04XMIDI: Forget old loop points when changing trackTorbjörn Andersson
This fixes warnings that would appear after a little while in Kyrandia 2, which would happen because every time the music changed it would add a new loop point. This was probably harmless because once the list was full it would keep re-using the last element, and I imagine all songs were set to loop forever. But this should be more correct, as I understand it.
2013-05-02AUDIO: Fix uninitalized variable. CID 1003160Eugene Sandulenko
2013-05-02AUDIO: Fix unitialized variable. CID 1003161Eugene Sandulenko
2013-05-02AUDIO: Fix unitialized variable. CID 1003162Eugene Sandulenko
2013-05-01MT32: Fix some non-initialized fields in MidiDriver_MT32 - CID 1002949Filippos Karapetis
2013-05-01AUDIO: Add missing breaks to switch statement - CID 1003770Filippos Karapetis
A mistake in commit 3dc788da63520b8baad2b5c0726f34168ab55356
2013-04-28AUDIO: Fix identation. CID 1003641Eugene Sandulenko
2013-04-28AUDIO: Do not error out when channel offset >= length after interrupt()Sven Hesse
This fixes a Protracker module in the OS/2 version of Hopkins FBI (bug #3612101). In row 0x30 of the first pattern, the set channel offset effect in the fourth track pushes the offset past the sample (repeat) length. This is not error; the mixing function already handles this case flawlessly. No assert() is necessary there.
2013-04-21AUDIO: Handle empty parent stream in LoopingAudioStreamWillem Jan Palenstijn
This should fix bug #3571139.
2013-04-20AUDIO: Cleanup namingMatthew Hoops
2013-04-20AUDIO: Remove default makeADPCMStream rate/channels valuesMatthew Hoops
2013-04-18AUDIO: Remove unused MixerImpl::_syst member varMax Horn
2013-04-16AUDIO: Fix invalid free callMatthew Hoops
2013-03-27MT-32: Sync with the latest changes in muntFilippos Karapetis
This syncs our code with munt commit 15e9f65
2013-03-03MT-32: Sync with the latest changes in muntFilippos Karapetis
2013-03-03MT-32: Also replace cosf() (C99) with cos()Filippos Karapetis
2013-03-03MT-32: Avoid using sinf() (which is C99) in favor of sin()Filippos Karapetis
2013-03-02MT32: Sync with the latest changes in muntFilippos Karapetis
The major change is the addition of a refined wave generator based on logarithmic fixed-point computations and LUTs
2013-03-02MT32: Update copyright yearFilippos Karapetis
2013-02-15Merge branch 'master' into hopkinsDreammaster
2013-02-04MT32: Also attempt to load roms named CM32L_CONTROL.ROM / CM32L_PCM.ROMFilippos Karapetis
This was accidentally removed in commit 5711d23
2013-02-04MT32: Sync with the latest changes in muntFilippos Karapetis
This syncs our code with munt commit ee380de
2013-01-27HOPKINS: Work around broken cadavre.mod in OS/2 and BeOS versionsTorbjörn Andersson
A large part of cadavre.mod is broken. No new notes play, and only the old background sounds remain. It's possible, perhaps even probable, that the original MOD player didn't have this problem, but all standalone players I've tried do, so I'm assuming it's the file that's broken. We work around it by changing the length of the song after it's been loaded to only include the good parts.
2013-01-26JANITORIAL: Use "End of anonymous namespace" as comment for anonymous ↵Johannes Schickel
namespaces.