Commit graph

375 commits

Author SHA1 Message Date
Jerome Fisher
f08482d0ce - Now uses playInputStream to add a channel to the mixer, instead of setting the premixer. There can be only one, and this conflicted with Adlib in multi_midi mode.
svn-id: r15821
2004-11-15 12:39:08 +00:00
Torbjörn Andersson
73afa3165b This has to be a typo.
svn-id: r15809
2004-11-14 14:58:39 +00:00
Eugene Sandulenko
2fb46f1b95 Make #pragma pack really multiplatform. Old code didn't work on
non-Win32 platforms.

svn-id: r15805
2004-11-14 11:46:29 +00:00
Jerome Fisher
504d54e8ab - Huge cleanup of LUT stuff.
- No longer stores a sawtooth waveform twice, once with each sample negated.
- More graceful handling of truncated waveformcache files.
- Fixed tuning of patterns for non-32KHz sample rates (needs checking).
- Note: Waveform cache format changed, will automatically be rebuilt.

svn-id: r15804
2004-11-14 08:04:56 +00:00
Jerome Fisher
0ed79dfad7 - Prettied up, fixed sign-extension bug.
svn-id: r15803
2004-11-14 07:54:43 +00:00
Jerome Fisher
a158e884a0 - More cleanup.
- Note-on MIDI commands outside the range 12-108 are now raised/lowered by octaves until in range (instead of being ignored).

svn-id: r15802
2004-11-14 04:40:12 +00:00
Jerome Fisher
1aeca6838b MT32 MidiDriver:
- Cleanup

MT32Emu:
- Lots more cleanup.
- Properly implemented pitch bending (not fast, but theoretically perfect).
- Full position delta is now calculated before PCM interpolation/decimation is performed, so that pitch modifiers will be considered.
- Now reports when using SSE or 3DNow, and when the samplerate is invalid.

svn-id: r15801
2004-11-14 04:13:15 +00:00
Jerome Fisher
5e442766e5 MT32 MidiDriver:
- Channels now ignore effectLevel() and chorusLevel(), instead of sending unsupported control change messages to MT32Emu (they're not supported in a real MT-32, either, according to docs).
- Implemented setPitchBendRange() by sending a sysex write command to adjust the patch.
- _outputRate is now hard-coded at 32000, until tuning can be fixed for other sample rates.

MT32EMu:
- Extended File interface to deal with reading/writing 16/32-bit values endian-independently (they're always big-endian on file).
- Improved usage of packing-related pragmas.
- Should now be endian-agnostic (without depending on #defines for the endianness).

svn-id: r15800
2004-11-13 19:24:37 +00:00
Paweł Kołodziejski
22afdfc5c9 renamed file mt32
svn-id: r15794
2004-11-12 11:32:35 +00:00
Paweł Kołodziejski
6f8f614893 renamed file mt32
svn-id: r15793
2004-11-12 11:09:47 +00:00
Jerome Fisher
e4f600ee48 - Minor improvement to failure handling.
svn-id: r15777
2004-11-10 10:50:47 +00:00
Max Horn
cbfa7e3b5c Use the actual output rate of the sound mixer when producing MT32 audio samples -> by default only does 22.5 kHz -> it's now actually almost usable on my machine ;-). Alternative approach might be to hard code 32000 here
svn-id: r15775
2004-11-10 00:25:58 +00:00
Max Horn
daee2edcfe oops
svn-id: r15734
2004-11-08 10:17:47 +00:00
Max Horn
79509f9383 cleanup
svn-id: r15733
2004-11-08 10:16:07 +00:00
Eugene Sandulenko
6d38776da0 Fix it on LE systems. SCUMM_LITTLE_ENDIAN is defined in common/scummsys.h,
so it's a good idea to have that included before check :)

svn-id: r15732
2004-11-08 01:17:55 +00:00
Max Horn
e759cf5522 Re-apply endian fix
svn-id: r15731
2004-11-07 18:25:32 +00:00
Torbjörn Andersson
6b3432a93e Be more consistent with the other module.mk files.
svn-id: r15719
2004-11-06 09:26:36 +00:00
Travis Howell
b36be2d8bc Remove stray ;
svn-id: r15717
2004-11-06 05:18:04 +00:00
Eugene Sandulenko
dee673d96e Improve reporting (OSD messages, file open errors) and fix typos.
Forgot to mention:

 o waveforms.raw is autogenerated if not present

svn-id: r15716
2004-11-06 02:20:43 +00:00
Eugene Sandulenko
805b21181a Major MT-32 emu overhaul based on KingGuppy's code.
o added configure option
 o mi2 intro doesn't freeze anymore and has no sound glitches
 o missing instruments in many titles are fixed
 o numerous memory overwrite bugs are fixed
 o code is cleaned a lot and splitted into many smaller files
 o mt32.cpp went to backends/midi
 o synced with upstream code
 o reverberation fixed

 * don't complain about File class wrapper :)
 * all custom types are back
 * #pragmas are to do
 * maybe some indentation is wrong too

I prefer smaller commits, but this thing came in one piece.

svn-id: r15715
2004-11-06 01:41:32 +00:00
Eugene Sandulenko
6fd31192e1 o Sync with upstream source
o Move back to old sawtooth filter, which sounds better

svn-id: r15683
2004-10-24 19:21:38 +00:00
Torbjörn Andersson
53d1021985 More cleanup. Too bored to continue now.
svn-id: r15682
2004-10-24 15:04:19 +00:00
Torbjörn Andersson
22581c3c10 More cleanup.
svn-id: r15681
2004-10-24 14:50:34 +00:00
Eugene Sandulenko
7b84693125 o Check size of waveforms.raw so output rate could be adjusted
o Eliminate rom_path, as we use our File class

svn-id: r15679
2004-10-24 13:03:42 +00:00
Eugene Sandulenko
e8811e7158 Oops
svn-id: r15670
2004-10-23 20:56:53 +00:00
Eugene Sandulenko
0b07a5f484 o Turn BASE_FREQ constant into variable. MT-32 has to be run in lesser time slices.
o Attempt to fix mi2, but that cure for symptom, not the cause. Under dosbox header is always valid, but here we get 0x41001612 instead of 0x41101612.

svn-id: r15669
2004-10-23 20:33:39 +00:00
Paweł Kołodziejski
c10cce6af1 fixed warnings
svn-id: r15665
2004-10-23 13:39:03 +00:00
Torbjörn Andersson
879c2562e6 More cleanup. Too bored to go on.
svn-id: r15664
2004-10-23 13:23:46 +00:00
Torbjörn Andersson
62ca7b6644 Cleanup
svn-id: r15663
2004-10-23 13:17:03 +00:00
Torbjörn Andersson
4d8bc9862c Cleanup
svn-id: r15662
2004-10-23 13:02:05 +00:00
Torbjörn Andersson
07a6802dff Cleaned up axtoi()
svn-id: r15661
2004-10-23 12:50:31 +00:00
Torbjörn Andersson
1a36eeda0e ScummVM style (partial)
svn-id: r15653
2004-10-22 15:59:11 +00:00
Max Horn
5c53a3e260 cleanup
svn-id: r15652
2004-10-22 15:56:39 +00:00
Torbjörn Andersson
bf588c163f ScummVM style.
svn-id: r15651
2004-10-22 15:48:56 +00:00
Torbjörn Andersson
a4eb97da4c Replaced the Bit* data types with ScummVM's int* and uint* types. The
64-bit type has been renamed int64 and uint64. As a consequence, bug
#1051999 (the MinGW compilation problems) is now fixed.

svn-id: r15650
2004-10-22 15:39:28 +00:00
Torbjörn Andersson
e88cd31e4d Indentation
svn-id: r15646
2004-10-22 10:24:48 +00:00
Torbjörn Andersson
8e1481ae8f Fixed warning. Hopefully without breaking anything.
The __int64 problem remains, though.

svn-id: r15645
2004-10-22 10:13:18 +00:00
Travis Howell
3843b6cb02 Correction for mingw compile
svn-id: r15644
2004-10-22 09:38:11 +00:00
Max Horn
5c87bcafa6 Fix sign warnings
svn-id: r15638
2004-10-21 23:03:09 +00:00
Eugene Sandulenko
9d0b746aaa Patch #1048326 Better MT-32 support
svn-id: r15635
2004-10-21 22:37:37 +00:00
Max Horn
72df42e047 Fix for bug #1049937 (FOA: Regression in Adlib music)
svn-id: r15618
2004-10-19 23:03:04 +00:00
Torbjörn Andersson
61e438df22 Made the calculation of _samples_per_tick a bit less prone to arithmetic
overflow. It failed if the output rate was 44100 Hz. (It didn't use to, but
somewhere along the line an unsigned value was changed to a signed. This
seemed like a better fix, though.)

svn-id: r15610
2004-10-19 08:47:10 +00:00
Max Horn
82a3d09a65 Fix warning
svn-id: r15593
2004-10-17 19:34:43 +00:00
Max Horn
267144e69c added MidiDriver_Emulated base class used by the adlib & ym2612 midi 'drivers'
svn-id: r15589
2004-10-17 17:49:45 +00:00
Max Horn
649eb19a3e Cleanup
svn-id: r15588
2004-10-17 17:12:35 +00:00
Max Horn
bdf66b1a07 Make use of the new setupPremix variant (i.e. use an AudioStream subclass instead of a premix proc)
svn-id: r15523
2004-10-11 22:19:22 +00:00
Chris Apers
2ca4529bba Use common PI value instead
svn-id: r15435
2004-10-06 10:14:31 +00:00
Chris Apers
951131e7c2 Zodiac midi driver
svn-id: r15028
2004-09-12 11:14:14 +00:00
Max Horn
759cd67de5 cleanup of TimerProc mess
svn-id: r14683
2004-08-22 13:27:34 +00:00
Jonathan Gray
d1616e1cb5 Add passthrough ability. Patch by Christian Schoenebeck with slight modifications
svn-id: r14354
2004-07-27 13:21:52 +00:00