Commit Graph

86 Commits

Author SHA1 Message Date
Aaron Culliney
53459c9e78 Clean up a number of Xcode build warnings 2017-09-28 16:27:12 -07:00
Aaron Culliney
51a5f5fcf7 Excise ERRLOG() in favor of LOG() 2017-07-15 14:39:15 -10:00
Aaron Culliney
3b1c72e872 Excise RELEASE_LOG() and RELEASE_BREAK() macros
- LOG() and assert() work just fine ;)
2017-07-15 14:19:31 -10:00
Aaron Culliney
3c1dcd4a69 Refactor to enable loading multiple AV backends
- Includes default 'null' backends with lowest priority
2017-07-15 13:25:00 -10:00
Aaron Culliney
4c893cc197 Beginnings of trace testing on Droid
- Currently broken because !CONFORMANT_TRACKS
2017-05-28 08:48:24 -10:00
Aaron Culliney
96611beab9 Revert "Avoid doing Mockingboard work as much as possible"
This reverts commit 1bb3f75a06.

    - Caused excessive glitching in U4 music
2016-11-05 10:13:35 -07:00
Aaron Culliney
1bb3f75a06 Avoid doing Mockingboard work as much as possible
- Fixes audio underflow issue on ancient Droid devices
2016-10-23 17:40:35 -07:00
Aaron Culliney
d2e61e5091 Ensure big-endian data in A2V2 save-file format
- Also sanity-check buffer read overflow during loading
2016-10-16 16:00:14 -07:00
Aaron Culliney
a417249691 Add more tests for save/restore feature 2016-10-15 13:36:03 -07:00
Aaron Culliney
37df740fd3 Add save/load state to mockingboard 2016-10-15 13:34:03 -07:00
Aaron Culliney
1294485a02 Beginnings of a pluggable peripheral card API and fix a CPU boot tracing divergence against AppleWin
- In particular, return floating_bus() for non-plugged in cards when accessing the $C100-$C700 range
2016-10-09 12:19:32 -07:00
Aaron Culliney
3a6c033077 Improve MB_TRACING adherence to baseline 2016-10-02 13:59:15 -07:00
Aaron Culliney
8921f79a14 Beginnings of Mockingboard tracing for automated testing 2016-08-27 13:33:05 -07:00
Aaron Culliney
35e3d6a969 Fix building with stricter Android NDK gcc 4.9 2016-08-21 08:53:39 -10:00
Aaron Culliney
b4c72c15c6 Formally disable SSI263 (speech synthesis) codepaths for now
- SSI263Thread was previously disabled (doesn't appear to be used for most games, e.g., U4 and U5)
    - As written this code would initialize 64 backend audio buffers ... this seems excessive, especially for low-end
      platforms we support (e.g., Android 2.3.3)
    - My limited understanding of these codepaths would suggest that only one phoneme should play at a time so
      presumably we should only need one additional backend audio buffer
    - We may also need to augment the soundcore/backend API to support playing/stopping these "one-shot" phonemes
    - Added assert(false) for DEBUG builds to discover which disk images blow up
2016-07-31 12:59:33 -07:00
Aaron Culliney
fe894b6ac2 Clarify codepaths for my Windoze-weary eyes 2016-07-25 21:22:36 -07:00
Aaron Culliney
eeba82ba24 Merge Mockingboard implementation from upstream AppleWin 2016-07-24 17:55:50 -07:00
Aaron Culliney
ac912ffd54 Ensure an intelligent default setting for mockingboard volume 2016-05-08 21:38:41 -07:00
Aaron Culliney
db816ad502 Refactor Android variant to use common shared JSON preferences
- Eliminates a whole bunch of boilerplate setter/getter code in various places
    - Accesses preferences directly from JSON data through custom json_parse.h API
    - Improves code locality for Java menus/settings
2016-04-11 22:01:30 -07:00
Aaron Culliney
1912428ed3 Properly account for mockingboard card enabled/disabled 2016-01-30 14:45:51 -08:00
Aaron Culliney
ba07bcc274 Avoid resetting Mockingboard state machine when all we need to do is reset the backend
- Also slightly disentangles audio initialization from reinitialization
2016-01-30 14:45:35 -08:00
Aaron Culliney
175df18401 Don't use long word for cycles counter
- Lightly optimize a hot code path
    - Include debug code for testing counter overflow
2016-01-20 23:17:30 -08:00
Aaron Culliney
abae59767c Enable simple heap memory fencing/scribbling in debug builds 2015-12-31 22:50:43 -08:00
Aaron Culliney
29fd1f5025 Bugfix : avoid massively overflowing heap memory 2015-11-14 09:56:11 -08:00
Aaron Culliney
0aacdfa9e5 Various fixes from Apple Clang static analyzer 2015-11-14 08:03:44 -08:00
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
f4fa5670b4 Add function-call time tracing for Linux/Android 2015-10-04 14:22:26 -07:00
Aaron Culliney
f343ad9dbd Get Mockingboard working somewhat better 2015-09-13 12:43:34 -07:00
Aaron Culliney
ed60b2ea73 Refactor VM initialization and shutdown 2015-09-11 23:03:17 -07:00
Aaron Culliney
a0cadc83c6 Refactor timing locking behavior
- Do not start CPU thread until after splash screen
    - Insure that only CPU thread can actually create/destroy the audio interfaces
2015-07-26 13:48:24 -07:00
Aaron Culliney
5291ee750d Add MB_ISEnabled() function 2015-07-23 23:46:23 -07:00
Aaron Culliney
5f4bf6b1a7 Use single buffer queue callback for OpenSLES/Android
- OpenSLES Callback now performs simple mix of 2 sources (speaker and mockingboard)
    - Avoids multiple callbacks which was a performance penalty especially for low-end droids
2015-07-12 12:59:49 -07:00
Aaron Culliney
60d32583ae Gets mockingboard playing with OpenSLES backend
- At ring buffer boundaries, we submit first the beginning of the samples buffer and then the end
2015-07-07 21:36:42 -07:00
Aaron Culliney
43f6eff62e Avoid segfaults if mockingboard not initialized 2015-07-04 18:11:12 -07:00
Aaron Culliney
a9307aa827 Remove hardcoded sample rate and buffer sizes
- Audio backend now specifies the sample rate and min/ideal buffer size for mono and stereo audio
    - Increase maximum speaker amplitude
2015-07-02 20:24:59 -07:00
Aaron Culliney
d5b7b5263c Misc tweaks 2015-06-30 22:10:30 -07:00
Aaron Culliney
bb8d51817b First cut at Android OpenSLES backend 2015-06-27 11:48:00 -07:00
Aaron Culliney
81941295e6 Refactor : simplify audio buffer API 2015-06-20 00:01:17 -07:00
Aaron Culliney
f353a11ec5 Refactor : clarify _this and _internal parameters 2015-06-17 20:54:51 -07:00
Aaron Culliney
433f079610 Refactor : renamed methods and eliminated unused parameters 2015-06-16 23:32:19 -07:00
Aaron Culliney
060c95e873 Refactor : remove unnecessary DSGetLock() 2015-06-16 23:19:02 -07:00
Aaron Culliney
6059bf370b Refactor : change API method to return error code instead of a success boolean 2015-06-16 22:43:50 -07:00
Aaron Culliney
17cfb8c3a3 Refactor : remove unused code and make constant code constant 2015-06-16 22:39:35 -07:00
Aaron Culliney
a2663298d1 Refactor : coalesce two structs into one for clarity 2015-06-16 21:18:52 -07:00
Aaron Culliney
aedada03e9 Refactor : remove unused ivars 2015-06-15 22:07:09 -07:00
Aaron Culliney
33a13abbc2 Refactor : Better segregation and modularization of the audio backend functions 2015-06-14 14:46:15 -07:00
Aaron Culliney
ec4ff3de10 Refactor : shuffle moar macros into mockingboard.c 2015-06-14 14:07:33 -07:00
Aaron Culliney
af1c6bf159 Refactor : audio system functions return nonzero on failure 2015-06-14 14:07:33 -07:00
Aaron Culliney
c8834a91e3 Refactor: Rename and remove some macros and variables 2015-06-14 14:07:33 -07:00
Aaron Culliney
93a578d40a Refactor : remove and rename certain globals 2015-06-14 14:07:33 -07:00