Commit Graph

441 Commits

Author SHA1 Message Date
Paweł Kołodziejski
7bc63a0ce3 fixes for uninitialized pan and volume
svn-id: r9998
2003-09-05 06:22:10 +00:00
Jonathan Gray
e17a451ac5 remove shadow'd var by using variable name from prototype
svn-id: r9979
2003-09-02 22:38:53 +00:00
Paweł Kołodziejski
7c4e678a87 moved volume and pan control into flow func
svn-id: r9976
2003-09-02 20:34:22 +00:00
Torbjörn Andersson
4b49daf3ff Fixed compiler warning that I introduced earlier.
svn-id: r9974
2003-09-02 16:51:51 +00:00
Torbjörn Andersson
f486997822 Added per-channel pausing. Maybe I should have named the pauseChannel()
function simply pause() to be consistent with stop(), but there already is
a pause() function and I don't want to have two functions with the same
name doing different things. (The current pause() function pauses all
channels.)

svn-id: r9968
2003-09-02 13:48:20 +00:00
Paweł Kołodziejski
db18d4657c forgot this
svn-id: r9957
2003-09-01 14:02:45 +00:00
Chris Apers
e6a0261c7e The channel could be destroyed so changeVolumeAndPan can't access it in that case
svn-id: r9955
2003-09-01 10:12:28 +00:00
Paweł Kołodziejski
82fea49671 added comments:
volume: 0 - 127
pan: (-127 <-> 0 <-> 127) (left <-> center <-> right)

svn-id: r9945
2003-08-31 20:36:53 +00:00
Paweł Kołodziejski
2533b23a60 added mixer features: volume and pan control per channel
svn-id: r9944
2003-08-31 20:26:21 +00:00
Torbjörn Andersson
f72681b10a Made PlayingSoundHandle unsigned again, since the mixer change was
reverted.

svn-id: r9930
2003-08-30 20:36:44 +00:00
Paweł Kołodziejski
c684a076ee revert id handle stuff
svn-id: r9927
2003-08-30 20:25:07 +00:00
Torbjörn Andersson
bfee72f757 If -1 is going to be a valid value for a PlayingSoundHandle, the data type
had better be signed...

svn-id: r9925
2003-08-30 20:07:09 +00:00
Paweł Kołodziejski
9c05d44d00 added func isChannelActive for mixer, and fixed handling numbers of channel 0
svn-id: r9924
2003-08-30 18:12:49 +00:00
Max Horn
57493197e8 small cleanup for the Ogg playback code
svn-id: r9852
2003-08-24 21:54:46 +00:00
Jamieson Christian
d7fae3d1cb More corrections to the VAR_MUSIC_TIMER
computations, mostly to produce the
exptected output with AD resources.

svn-id: r9730
2003-08-16 17:08:22 +00:00
Jamieson Christian
121b00a6f7 Corrected timing mechanism for RO music streams.
RO streams have built-in timer markers (the
unknown 0xA0 mentioned in FR [742249]) that
override automated methods of updating
VAR_MUSIC_TIMER. Since these timer markers
do not seem to be present in AD resources, the
old mechanism is used if MD_ADLIB is the current
MidiDriver.

svn-id: r9720
2003-08-16 09:34:19 +00:00
Jamieson Christian
17be1ad7d5 Removed incorrect acknowledgements (copy/paste error)
svn-id: r9680
2003-08-14 05:07:31 +00:00
Bertrand Augereau
0d54ac09c1 ZeroInputStream::readBuffer didn't have the same signature as the base class version, making VC.NET 2K3 complain
svn-id: r9668
2003-08-13 22:01:34 +00:00
Jamieson Christian
fb62ba61ca Added PC Speaker and PCjr command line options,
in preparation for Kirben's addition of WA support
for games that already have AD tracks.

svn-id: r9656
2003-08-13 14:08:21 +00:00
Robert Göffringmann
7f7b0af613 added SoundMixer::pauseChannels for pausing SFX and keeping adlib music running (needed by BASS when menu bar drops down)
svn-id: r9607
2003-08-09 19:19:27 +00:00
Jamieson Christian
154e872d5a Added generic send() option to MidiChannel.
This circumvents problems doing generic send()
calls to MidiDrivers that support more than
16 MIDI channels (i.e. Adlib). Because of the
way it interacts with MidiDriver, Simon could
have run into a problem if it tried to
allocate more than 15 Adlib music channels
(though this would only happen in very, VERY
rare circumstances).

Also fixed a problem with the channel
numbering scheme used by MidiDriver_Adlib,
in particular the percussion channel number.

svn-id: r9604
2003-08-08 11:54:24 +00:00
Jamieson Christian
4353f4531c Send All Notes Off to every channel on close
svn-id: r9593
2003-08-08 07:23:11 +00:00
Max Horn
ac6bd10c59 my code was actually right. Rather the calling code is evil, it passes us odd buffer sizes for 16 bit audio data, which of course made no sense -> I added some asserts against this
svn-id: r9590
2003-08-07 23:54:39 +00:00
Jamieson Christian
93c90f4674 Fix for Bug [780924] IMUSE: Pitchbend isn't reset when changing tracks
When scanning (not jumping) to a target location
in a different track, the current track is first
scanned to the end to update the player state
before starting into the new track.

Miscellaneous scan-related cleanup is included.

svn-id: r9589
2003-08-07 23:42:15 +00:00
Max Horn
f67b126f1d replace code in readBuffer by slightly less efficient but hopefully working code (at least it fixes an endless loop in COMI for me). I did fix the originaly bug in my optimization, and right now I clueless as to why that code isn't working as it should <sigh>. Need sleep
svn-id: r9588
2003-08-07 22:19:55 +00:00
Jamieson Christian
d8464534a5 Added comment to new macro
svn-id: r9581
2003-08-06 20:44:42 +00:00
Jamieson Christian
99716fc38e Changed readSample template function
to Fingolfin's new READSAMPLE macro.
Circumvents buggy template function
handling in MSVC6. Props to Fingolfin
for tracking this bug down by remote.

svn-id: r9580
2003-08-06 20:41:05 +00:00
Max Horn
69ee268e7f some cleanup
svn-id: r9575
2003-08-06 17:13:04 +00:00
Chris Apers
1a0d308e04 Fixed type mismatch error compiling palmos port
svn-id: r9552
2003-08-06 11:53:18 +00:00
Max Horn
75db41750e getting rid of g_mixer; removing lots of whitespace
svn-id: r9527
2003-08-05 23:58:24 +00:00
Max Horn
48d1739e0a some cleanup; added Channel::getVolume, once somebody tells me what exactly is needed, I can add per-channel volume, and also per-channel panning
svn-id: r9525
2003-08-05 23:03:42 +00:00
Max Horn
d618ace0c0 begone, old mixer code
svn-id: r9521
2003-08-05 21:46:56 +00:00
Max Horn
7ff88ea392 more cleanup
svn-id: r9513
2003-08-05 18:17:26 +00:00
Max Horn
79fd7ee441 cleanup
svn-id: r9512
2003-08-05 18:12:59 +00:00
Max Horn
4c4aa4e957 fix bug #783423
svn-id: r9484
2003-08-05 11:30:13 +00:00
Max Horn
1eaf41eda4 more cleanup (like the previous two, I just moved around code, to clearly separate the old and the new mixer code)
svn-id: r9479
2003-08-05 02:05:37 +00:00
Max Horn
2bc604081e some more cleanup
svn-id: r9478
2003-08-05 01:47:47 +00:00
Max Horn
ded1df35f9 cleanup; removed some code duplication
svn-id: r9477
2003-08-05 01:41:29 +00:00
Max Horn
74188e6143 and finally VorbisInputStream::readBuffer. Once we verified the new readBuffer methods all work, we can get rid of readIntern again and merge those back into the regular read() methods
svn-id: r9476
2003-08-05 01:22:09 +00:00
Max Horn
1de064ee2c optimized MP3InputStream::readBuffer (once more, I won't gurantee for correctness although it seems to work fine over here)
svn-id: r9475
2003-08-05 01:14:27 +00:00
Max Horn
154ca4f2cf simplified code a bit
svn-id: r9474
2003-08-05 00:53:25 +00:00
Max Horn
b1d3b7ab99 optimized WrappedMemoryStream::readBuffer (It's almost 3 AM, so I don't trust myself, hence I'll leave this as an #ifdef for now :-)
svn-id: r9473
2003-08-05 00:50:15 +00:00
Max Horn
b96e5501e6 catch one potential problem, namely if eos is already reached when readBuffer is called ('This should never happen anyway', famous last words)
svn-id: r9472
2003-08-05 00:31:00 +00:00
Max Horn
e1ff91ea7d get rid of calls to the obsolete AudioInputStream::size method
svn-id: r9471
2003-08-05 00:29:37 +00:00
Max Horn
8850f858bc not really sure if using readBuffer would give any gain in CopyRateConverter
svn-id: r9470
2003-08-04 22:49:29 +00:00
Max Horn
d280258e09 renamed eof -> eos (end of stream); hid MP3/Vorbis stream classes completly (by providing factory methods); new readBuffer method for AudioInputStream for improved speed of the mixer; new MusicStream class (subclassed for MP3/Vorbis sound) which offers a getRate method; some other tweaks
svn-id: r9467
2003-08-04 22:15:16 +00:00
Max Horn
996d4f1391 fixed EOF handling of MP3 streams (subtract time from duration timer, instead of adding it...)
svn-id: r9464
2003-08-04 16:28:41 +00:00
Max Horn
ada236a63b one addition less
svn-id: r9425
2003-08-02 19:17:54 +00:00
Max Horn
7ec38f5f02 some more tweaks
svn-id: r9424
2003-08-02 19:09:52 +00:00
Max Horn
20ba086511 slightly cut down on the number of times eof() is called
svn-id: r9423
2003-08-02 18:29:52 +00:00