1
0
Fork 0
Commit graph

84 commits

Author SHA1 Message Date
krcroft
7375db2a83 Use type-specific host conversion funcs 2020-04-15 14:26:29 +02:00
Patryk Obara
c05bbafb5d Create byteorder header for host_to_le functions 2020-04-15 00:01:25 +02:00
Joshua Fern
f2029d71d8 Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
Patryk Obara
77c4523723 Byteswap captured audio samples on PPC
Fixes: #161
2020-02-08 14:56:14 +01:00
Patryk Obara
3a68ba2b26 Indicate system includes for relevant SDL headers 2019-12-26 03:23:19 +01:00
Patryk Obara
a06035a35e Replace SDL 1.2 with SDL 2.0
This massive patch is based on work of NY00123, which was published on
Vogons forum in 2013 and was waiting for inclusion in SVN since then:

https://www.vogons.org/viewtopic.php?f=41&t=34770

Revision from December 2018 was used to kickstart this work. However, a
number of changes were implemented:

- Original patch preserves all SDL 1.2 code by ifdefing it; this patch
  completely removes all code ifdefed for several versions of SDL 1.2.*
  This way the code will be easier to maintain going forward and
  features enabled by SDL 2.0 do not need to be backported.
  A side-effect of this change is almost-complete removal of DirectDraw
  support - but users can now use Direct3D based acceleration (without
  any ifdefs in code).
- Code ifdefed for Android was removed to make the project easier to
  understand and modify. Android port should still be possible, but it
  requires more work (mostly CI and buildsystem work).
  Android-related functionalities that were cross-platform were
  preserved.
- Code ifdefed for OpenGL ES (which was only used for Android) was
  removed - this should not affect Android support, as
  hardware-accelerated 2D should still be viable via "texture" output,
  but it was not tested, as buildsystem does not support Android ATM.
- SDL_cdrom code is not included; it was outside of scope of SDL2
  changes. Inclusion of that library did not justify supporting one
  small usecase (playblack of CD audio from physical CDs).
- Few code warning were fixed (but new sdl_mapper implementation
  introduces many, many new warnings).
- Some formatting changes were implemented.

Overall, the original patch had ~40k lines of code - here it was
trimmed to +769,-972 (so more old code got removed than new code added).

This implementation was extensively tested on Linux and somewhat tested
on Windows 10.  It fixes numerous issues (too many too list).

Testing found two small regressions:

- Starting game in fullscreen makes it impossible to switch back to
  windowed mode correctly (Windows 10)
- Scaling works a bit worse, only in text mode, only in window (Linux)

This implementation introduces revised user settings in sdl section - it
is only partly compatible with settings from SDL 1.2; this is an issue,
but it will need to be addressed in a separete commit.
2019-12-26 03:23:19 +01:00
krcroft
eaeb001b17 Play into subsequent track(s) if playback length exceeds the the current track
Issue reported by Dagar and Pr3tty F1y, and confirmed as a bug by ripsaw8080.
Thank you!

This fixes the GoG release of Betrayal at Krondor which (either due to CD mastering
issues or a faulty rip), requests playback of a given track at the tail end
of the prior track.

In debugging and performing this fix, many debug messages were improved as well
as making some small small code adjustments, such as using iterators to point to
individual tracks (track->attribute) instead of using the tracks array
(tracks[track -1].attribute).
2019-11-24 17:34:54 +01:00
Patryk Obara
cdc193170c Merge branch 'svn/trunk' r4293 2019-11-21 20:53:21 +01:00
Peter Veenstra
db51b63554 Remove some old code and do an a=a to trick a compiler in non-debug mode
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4293
2019-11-20 07:17:12 +00:00
krcroft
d1a6f373cb Refactor CD-DA flow by removing intermediate buffers and loops
Thanks to @ripsaw8080 for insight into CD-DA channel mapping,
@hail-to-the-ryzen for testing and flagging a position-tracking bug,
and @dreamer_ for guidance and code review.

The CD-DA volume and channel mapping loops were moved to generic mixer
calls and no longer require a pre-processing loop:
 - Application-controlled CD-DA volume adjustment is now applied using
   an existing mixer volume scalar that was previously unused by the
   CD-DA code.
 - Mapping of CD-DA left and right channels is now applied at the tail
   end of the mixer's sample ingest sequence.

The following have been removed:
 - The CD-DA callback chunk-wise circular buffer
 - The decode buffers in the Opus and MP3 decoders
 - The decode buffer and conversion buffers in SDL_Sound
These removals and API changes allow the image player's buffer
to be passed-through ultimately to the audio codec, skipping multiple
intermediate buffers.
2019-11-12 08:16:53 +01:00
Peter Veenstra
1fbaff47fc Update year and address of FSF
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4183
2019-01-25 14:09:58 +00:00
Peter Veenstra
5bb10db88b Time keeps on ticking
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4109
2018-05-29 12:58:58 +00:00
Peter Veenstra
84eaccc517 slight refactoring, so that it is easier to correctly increase TICK_SHIFT above 16.
Maybe 24 will be a nice value, judging from the tests.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4094
2018-04-16 12:52:49 +00:00
Peter Veenstra
ba9c9e1ad6 Fix bug 467.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4049
2017-09-11 10:00:00 +00:00
Peter Veenstra
33da572d9e Change adaptive rate parameters slightly, so that is a less jumpy
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4038
2017-09-02 08:13:49 +00:00
Peter Veenstra
6cf39c1fc6 Years update
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4021
2017-05-30 11:35:08 +00:00
Peter Veenstra
e4d868f93d Revert mixer to request data in the device rate instead of the mixer rate.
Fixes bug #457.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4019
2017-05-15 17:37:05 +00:00
Peter Veenstra
7f15ccffb2 Add some spaces for readability and update the position after forwarding to hopefully improve sound in GOB2.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4013
2017-05-10 09:03:17 +00:00
Peter Veenstra
c82dcf6c67 Not sure how that ended up there.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4011
2017-05-08 16:29:51 +00:00
Sjoerd van der Berg
a60b983712 Rewrite some mixing code to fix issue with equal rates having aliasing issues
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4002
2017-01-03 21:36:37 +00:00
Peter Veenstra
a3345eed24 Spaces in LOG_MSG and some at the end of the line.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3999
2016-10-02 14:12:32 +00:00
Peter Veenstra
0316809ac9 Some more changes by Jochen
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3924
2015-07-09 06:25:46 +00:00
Peter Veenstra
79419f1f53 Bring OS2 port up to date. Thanks Jochen
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3923
2015-07-08 12:01:33 +00:00
Peter Veenstra
0f4c92ca32 Year update.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3878
2015-01-06 14:40:32 +00:00
Peter Veenstra
ffb8cec4d6 Rework ListMidi so it can be more easily added to more backends.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3836
2013-10-18 11:55:02 +00:00
Peter Veenstra
2fea508f7f Year update
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3812
2013-01-15 09:03:13 +00:00
Peter Veenstra
a7af902f2f Even our comments and status messages have less bugs now (jomalin)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3764
2011-12-08 12:47:04 +00:00
Peter Veenstra
999f33de27 Update year. Remove CVS tags
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3700
2011-04-26 09:34:55 +00:00
Peter Veenstra
6864fa295f Why didn't we have this earlier..
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3556
2010-03-06 10:35:49 +00:00
Peter Veenstra
a78b2c4f8b Update year
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3548
2010-02-11 13:36:50 +00:00
Peter Veenstra
9c2a664661 Small rewrite by ih8regs.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3461
2009-09-05 11:10:04 +00:00
Sjoerd van der Berg
f6def87e34 Include an extra scale factor in the mixer volume to be set by a device
Set the adlib device scale at 2.0


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3377
2009-04-28 21:48:24 +00:00
Peter Veenstra
8516e5d4bf Remove dirent.h dependency.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3359
2009-04-26 18:24:36 +00:00
Sjoerd van der Berg
88caf1dc71 Add compiler testing for always_inline attribute
Add compiler testing for fastcall attribute
Add the FASTCALL define to visual c
Remove some overkill inline routines
Make sure that all the inline routines in headers are static


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3355
2009-04-25 16:25:03 +00:00
Sebastian Strohhäcker
ce5ef7a254 fix 16bit mixer handling on bigendian machines (sb16 hdma, cdda for cd images), also see sf patches #1284246 and #1989569
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3324
2009-03-19 20:45:42 +00:00
Sjoerd van der Berg
a590bad2d9 Add 32bit signed type for mixing
Change the mixer template to use a class type


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3322
2009-03-16 18:33:59 +00:00
Peter Veenstra
2314183f15 Some warnings.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3227
2008-10-05 14:44:52 +00:00
Sebastian Strohhäcker
0190a6e149 Silence a few warnings.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2964
2007-08-12 19:16:01 +00:00
Sebastian Strohhäcker
0c24e87fdc silence some warnings, add most of sf patch #1185267 by Moe
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2883
2007-06-12 20:22:09 +00:00
Sebastian Strohhäcker
201d9b6592 fix mixer underflow (muted pcspeaker in unlocked speed mode; thanks to ykhwong for his report)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2848
2007-05-01 18:57:19 +00:00
Peter Veenstra
fdd16dea1a Happy New Year\!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2728
2007-01-08 19:45:42 +00:00
Peter Veenstra
4510807269 rewrite powf stuff a bit.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2718
2006-11-07 11:43:13 +00:00
Sebastian Strohhäcker
e11274fe6e add/fix some more soundblaster modes (Srecko)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2692
2006-08-25 09:40:19 +00:00
Sebastian Strohhäcker
be9a70adfd fix unsigned 16bit samples sb16 output
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2690
2006-08-21 20:08:26 +00:00
Peter Veenstra
94bbf1e01f Add patch "[ 1488441 ] fix for dosbox-0.65 build error on Solaris 5.8 (powf)" by Claudio Fontana.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2625
2006-05-18 11:32:09 +00:00
Peter Veenstra
cc60e080e0 update some comments. Update mixer to be more oldstyle
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2559
2006-03-27 19:41:55 +00:00
Sjoerd van der Berg
0e3603396e New mixer routine to handle speeding up emulator causing faster output
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2482
2006-02-11 09:37:16 +00:00
Peter Veenstra
df67775306 time passes on and on....
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2480
2006-02-09 11:47:57 +00:00
Sjoerd van der Berg
b45c282867 Avi capturing with zmbv codec
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2447
2006-01-30 10:04:20 +00:00
Peter Veenstra
3ecebe3887 Turn off speaker faster. More aggressive premixing.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2403
2005-12-05 12:04:40 +00:00