Commit Graph

372 Commits

Author SHA1 Message Date
Max Horn
643e88b04c get rid of BUGGY_NEW_MP3_PLAYER
svn-id: r9347
2003-07-31 20:28:11 +00:00
Max Horn
0b4e48b59e revamped MP3/Vorbis CD 'emulation' code to use a PlayingSoundHandle -> this allows to finally get rid of the hackish isChannelActive/isChannelUsed methods in SoundMixer
svn-id: r9346
2003-07-31 20:24:10 +00:00
Max Horn
d8494d658b fixed MP3InputStream, now seems to work properly (kind of a surprise)
svn-id: r9345
2003-07-31 19:32:38 +00:00
Max Horn
16425977b7 icur was not being saved between rate conversion calls
svn-id: r9344
2003-07-31 19:08:57 +00:00
Paweł Kołodziejski
e5e117006a back disable warnings into stdafx.h, vc6 is lack of warnings support
svn-id: r9337
2003-07-31 18:35:01 +00:00
Max Horn
1b52e9f19c added new header file backends/intern.h; removed some stuff from common/system.h which is either only of interest to backends or code instantiating a backend (->backends/intern.h); also removed fmopl specific enums (->sound/fmopl.h)
svn-id: r9327
2003-07-31 12:33:33 +00:00
Jamieson Christian
7c16006cc7 Fix for RC bug [780675] MI2: Reoccuring crash
Tightened up OOB track selection handling in
MidiParser. Apparently some SMFs in the Mac
version of MI2 (and other games?) specify
track -1 in their jump commands to indicate
a jump within the same track.

svn-id: r9321
2003-07-31 06:50:13 +00:00
Jamieson Christian
c5de745580 Disabled unknown pragma warning in MSVC-6.
svn-id: r9320
2003-07-31 06:47:05 +00:00
Max Horn
f74197ce8b make use of the new MP3InputStream in ChannelMP3CDMusic - but disabled by default, because it is still quite buggy (e.g. crashes at end of stream etc)
svn-id: r9314
2003-07-31 01:36:24 +00:00
Max Horn
9b2d4f92aa removed the AudioInputStream::size method -> only eof() is really needed, and this can be implemented more efficiently stand-alone; implemented MP3InputStream (work in progress)
svn-id: r9313
2003-07-31 01:21:38 +00:00
Max Horn
5225597d85 cleanup
svn-id: r9312
2003-07-31 01:06:01 +00:00
Max Horn
6143058422 fixed incorrect MSVC fixes; simplified readSample code (bugs #780167 and #780420)
svn-id: r9302
2003-07-30 19:43:51 +00:00
Max Horn
26d05c0190 the VC warning for unknown pragmas is now gloabally disabled, no need to work around it locally
svn-id: r9300
2003-07-30 18:40:28 +00:00
Torbjörn Andersson
15378172cd Partial fix for bug #780167 ("SIMON1/2: Sound problems"). It seems to fix
the crash, but the sounds play at the wrong rate, I believe.

svn-id: r9298
2003-07-30 18:20:45 +00:00
Jamieson Christian
20d06e2c3d Fixed MSVC errors
svn-id: r9288
2003-07-30 09:26:54 +00:00
Max Horn
aa6c99b5da removed some debug output
svn-id: r9282
2003-07-29 13:36:06 +00:00
Max Horn
6b470390f7 cleanup
svn-id: r9281
2003-07-29 12:39:41 +00:00
Max Horn
45ebcdbde1 account for the data in the _buffer, too
svn-id: r9276
2003-07-29 03:02:25 +00:00
Max Horn
fb7deafaef after looking at SAM and DOTT, it seems the actor-voice sync actually is *worse* with a non-zero _silenceCut value - setting it to 0 gives perfect sync for me... odd, when did this change? Anyway, removing _silenceCut. If you notice sync problems, tell me
svn-id: r9275
2003-07-29 02:48:38 +00:00
Max Horn
04843469eb some cleanup; moved around some stuff, preparing to unify more code of ChannelMP3CDMusic and ChannelMP3
svn-id: r9274
2003-07-29 02:21:07 +00:00
Max Horn
bb35528f43 return immediately after commiting suicide; enable new rate conversion code
svn-id: r9273
2003-07-29 01:43:35 +00:00
Max Horn
021a701827 hooked up ChannelVorbis to the new rate converter system, using VorbisInputStream
svn-id: r9272
2003-07-29 01:37:50 +00:00
Max Horn
77eb284062 added VorbisInputStream
svn-id: r9271
2003-07-29 01:37:03 +00:00
Max Horn
1be944755f added makeRateConverter factory function
svn-id: r9270
2003-07-29 01:36:10 +00:00
Travis Howell
3f99e8d1d4 Fix mingw compile
svn-id: r9269
2003-07-29 01:35:37 +00:00
Max Horn
4e7c115681 cleanup
svn-id: r9266
2003-07-29 00:05:36 +00:00
Max Horn
57a413f028 experimental new rate conversion code (use SOX_HACK to en-/disable it); note that right now only the linear filter works, the high quality resample in resample.cpp is in flux; right now the top priority for me is to get MP3/Vorbis resampling working
svn-id: r9261
2003-07-28 20:42:54 +00:00
Max Horn
ed6521f332 fix for bug #776169
svn-id: r9259
2003-07-28 20:25:09 +00:00
Max Horn
c6a4a1d37d make wrapped stream work (I can hear some music in CoMI now before it segfaults :-)
svn-id: r9258
2003-07-28 18:01:56 +00:00
Max Horn
475bc72277 moved st_gcd to resample.cpp
svn-id: r9257
2003-07-28 18:01:00 +00:00
Max Horn
13eee4b06f rewrote the input streams, this should be more straightforward and inline slightly better (the fact that the main AudioInputStream methods are virtual still means that no inlining can take place there; but of course, if we did change that, all the rate converters would have to exist in 8, instead of currently 2, compiled versions)
svn-id: r9256
2003-07-28 17:28:29 +00:00
Max Horn
7ea67048c1 more work on WrappedMemoryStream (not yet tested)
svn-id: r9253
2003-07-28 16:55:43 +00:00
Max Horn
9e051fa507 instead of 'int channels', use 'bool stereo' (less extensible, but then I don't think we'll ever support 5.1 sound :-)); fixed a bug in st_rate_flow where it sometimes would overflow the output buffer; made CopyRateConverter a template, too, increasing efficency
svn-id: r9239
2003-07-28 11:13:01 +00:00
Max Horn
81baae7ddc added CopyRateConverter (used if inrate == outrate)
svn-id: r9214
2003-07-28 01:50:46 +00:00
Max Horn
e87bc6d89e use a single converter for both channels (if input data is stereo), for improved efficency; renamed MemoryAudioInputStream -> LinearMemoryStream and use some template voodoo to make the baseclass of Input8bitSignedStream etc. variable; added (commented out) draf of WrappedMemoryStream
svn-id: r9209
2003-07-28 01:13:31 +00:00
Jamieson Christian
be898b414f For for Bug [775654] DOTT: Hanging notes
Corrected active notes tracking when switching
between Type 2 SMF tracks. Although Note Off
events from the previous track are properly
simulated, those sustaining notes are cleared
from the active notes list so that jumps
within the new track will not attempt to
sustain them again.

svn-id: r9194
2003-07-26 19:37:54 +00:00
Max Horn
226ee61f71 oops accidentally broke the 'old' 8bit resampling code :-(
svn-id: r9192
2003-07-26 01:44:37 +00:00
Max Horn
c520d2d423 move AudioInputStream implementations & makeInputStream into separate .cpp file
svn-id: r9190
2003-07-25 13:42:05 +00:00
Max Horn
2ae3e45aea reduced source code duplication
svn-id: r9189
2003-07-25 13:34:25 +00:00
Max Horn
791efd853a lots of mixer changes: replaced _volumeTable by _globalVolume (applying volume after resampling is more accurate); made more member vars of SoundMixer protected (and thus added some new getter methods); added (untested) support for a second (stereo) channel when playing MP3
svn-id: r9184
2003-07-25 01:19:14 +00:00
Max Horn
95bb74e2b8 round to nearest
svn-id: r9183
2003-07-25 01:05:08 +00:00
Max Horn
f086ab5a05 whitespace
svn-id: r9181
2003-07-24 21:26:46 +00:00
Max Horn
09263a1feb added volume support; some cleanup; provided exactly as many samples as were requested in the 'resample' algorithm (if possible)
svn-id: r9180
2003-07-24 21:26:00 +00:00
Max Horn
1622ac31da added RateConverter classes as thin wrappers around st_* functions; renamed InputStream -> AudioInputStream and cleaned up the hierarchy of its subclasses; added makeInputStream() auxillary function
svn-id: r9179
2003-07-24 18:20:12 +00:00
Max Horn
b9d380bba4 new files, based on SoX (http://sox.sf.net): better resampling code. Note that my mixer.cpp changes are on purpose not yet in CVS since they are not complete. Only reasons I checkin these files is that it's much more comfortable to have CVS, since I need to rewrite parts of resample.cpp now (I already have lots of modifications in). Also expect more OO in the future
svn-id: r9176
2003-07-24 17:46:38 +00:00
Torbjörn Andersson
a327f805ac Fixed regression in clamped_add_16() that kept it from clamping. This was
quite noticeable in the BASS floppy intro.

Of course, if it turns out that 'int' is also only 16 bits it still won't
work, but in that case we run into problems even before this function is
called.

svn-id: r9145
2003-07-23 13:16:58 +00:00
Max Horn
0c47e125af simplified code
svn-id: r9061
2003-07-17 20:44:36 +00:00
Max Horn
d31942c898 oops
svn-id: r9023
2003-07-14 20:45:33 +00:00
Max Horn
33e6989944 removed whitespaces at line ends; added stopHandle
svn-id: r9022
2003-07-14 20:09:14 +00:00
Chris Apers
8b27f60434 Fixed RTTI warnings with PalmOS port
svn-id: r8951
2003-07-12 17:43:39 +00:00