Commit Graph

53 Commits

Author SHA1 Message Date
Aaron Culliney
8f2ab2f072 Compress cpu65_vmem_* function tables to save space 2019-10-27 16:26:35 -07:00
Aaron Culliney
0478afe60e Pervasively use full range of signed 16bit samples for speaker 2018-11-22 10:10:24 -08:00
Aaron Culliney
3a35404fa3 Enable semi-hackish codepath to reduce audio glitching on fast loading 2018-11-20 12:08:37 -08:00
Aaron Culliney
18d831b04c Fast disk loading is enabled from a pref 2018-11-07 06:49:16 -08:00
Aaron Culliney
aa41c89e68 Lite refactor video timing 2018-05-06 10:14:47 -07:00
Aaron Culliney
eb13718c5e Introduce CPU thread function annotation and enforcement 2018-04-22 08:43:16 -07:00
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
cb31ccaf9c Fix a bunch of Clang static analysis issues 2016-09-10 11:32:33 -06:00
Aaron Culliney
7ad7b65d11 Add speaker tracing API and tests 2016-07-23 17:35:11 -07:00
Aaron Culliney
23a874456c Better audio defaults 2016-04-13 19:45:55 -07:00
Aaron Culliney
74a5b74ae3 Refactor prefs into JSON publish/subscribe API
- Breaking changes currently only tested on Linux desktop build =P
    - Goal is to eventually eliminate most/many of the disparate getter/setter functions to allow better
      modularity/scaling and platform portability
2016-03-26 13:44:13 -07: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
8626215205 Silence a number of spurious compiler warnings
- Existing warnings are now a good proxy for areas of code smell ;-)
2016-01-10 12:09:04 -08:00
Aaron Culliney
abae59767c Enable simple heap memory fencing/scribbling in debug builds 2015-12-31 22:50:43 -08:00
Aaron Culliney
05698c6a5e Avoid another audio buffer overflow manifesting on Kindle 2015-11-29 22:14:55 -08:00
Aaron Culliney
20f79dc5eb Avoid buffer overflow
- Appears to fix a crash on Kindle Fire 1st Gen
2015-10-30 23:14:20 -07:00
Aaron Culliney
aa9a89a3e4 Flag an assert that needs to be rethought 2015-10-24 14:29:52 -07:00
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
df38695779 HACKish commit to ignore SIGABRTs
- FIXME TODO ... investigate why these are triggering occasionally on Droid builds
2015-10-20 20:47:08 -07:00
Aaron Culliney
f4fa5670b4 Add function-call time tracing for Linux/Android 2015-10-04 14:22:26 -07:00
Aaron Culliney
5692c1dc95 Submit a number of quiet samples on first initialization
This seems to make it a little less choppy on mobile first launch
2015-09-15 22:18:43 -07:00
Aaron Culliney
ef7472b3ac Fix invalid assert ... system_buffer_size can be modified lower 2015-09-07 11:05:22 -07:00
Aaron Culliney
e108f4591a Fix a broken assertion ... compare samples size, not bytes size 2015-09-06 13:54:45 -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
bca223780c Properly set speaker volume 2015-07-24 22:21:01 -07:00
Aaron Culliney
2ae8468b10 Fix desktop Linux build break 2015-07-12 14:29:47 -07:00
Aaron Culliney
2a0a9c03b7 Misc speaker codepath tweaks 2015-07-12 13:01:25 -07:00
Aaron Culliney
432d2fb563 Renamed some speaker API methods 2015-07-12 13:00:39 -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
2381868c63 Enable speaker stereo output 2015-07-11 14:21:07 -07:00
Aaron Culliney
2910b6180e Avoid speaker_going_silent codepath on Android 2015-07-04 18:11:58 -07:00
Aaron Culliney
0c6fe702e5 Simplify the going-silent logic 2015-07-02 20:37:06 -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
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
1679b8e76a Refactor : excised more DS deadc0de 2015-06-14 14:07:33 -07:00
Aaron Culliney
f234de116f Refactor speaker system to prevent audio glitches and to support CPU automatic speed switching
Squashed commit of the following:

    REFACTOR : fix comments, logging, and rename some variables
    REFACTOR : fix up some commentary, clean deadc0de
    REFACTOR : mostly fix all the audio glitches
        - amplitudes of samples are gradually shifted to zero when speaker has fallen silent
        - simplifies speaker state machine
        - fullspeed mode only enqueues quiet samples
    REFACTOR : fix up a number of other functions and comments
    REFACTOR : clean up code to submit normal speed wave buffer to OpenAL
    Move some initializations to the cpu_thread()
    REFACTOR : properly reset the speaker cycles access counter so we don't underflow and assert
    REFACTOR : should never get a split buffer from our soundcore implementation
    Fix warning from gcc ... static array size needs to be computed from integer values
    REFACTOR : gcc (but not clang) complains about these, so just make them preprocessor defines
    REFACTOR : use unsigned long long because we don't actually care that this counter is 64bit
    REFACTOR : remainder_buffer and miscellaneous tweaks
        - Adds implementation commentary to document remainder_buffer purpose
        - Also adds sample average for square wave boundary in case where remainder_buffer not used (whole-sample boundary)
        - Variable renaming and code shuffling
    REFACTOR : do not dynamically alloc remainder buffer
        - Never attribute to cache-coherancy bugs what is a simple thread race =P
    REFACTOR : comments and whitespace
    REFACTOR : rename public speaker API functions
    REFACTOR : clean up public speaker API
    REFACTOR : tabs to spaces
    REFACTOR : moar deadc0de clean up and renaming
    REFACTOR : remove deadc0de paths from soundcore
    REFACTOR : fully excise soundtype stuff now that we only support soundcard output
    Move a file static to function scope
    REFACTOR : rename more variables and remove deadc0de
    REFACTOR : samples_buffer naming and change to explict int16_t
    REFACTOR : removed deadc0de and shuffled code locations
    REFACTOR : remainder buffer naming and clarify type
    REFACTOR : move joystick timing to VM module and remove header visibility
    REFACTOR : clarify speaker variable name
    REFACTOR : clarify cycle counting codepaths
    REFACTOR : VBL/timing interfaces
        - eliminates passing around a common global
    REFACTOR : names and comments
    HACK around volume issue
    REFACTOR : rename speaker feedback variable
    REFACTOR : rename global total cycle count
    REFACTOR : rename a constant
    Fix test builds
    REFACTOR: rename to is_fullspeed
    REFACTOR : local variable naming changes
    REFACTOR : migrate cycle timing variables to correct location and remove header visibility
    Allow fullspeed codepath to update speaker
    REFACTOR : remove deadc0de paths in prep for cleanup
    REFACTOR : speaker now manages its own VM entry point
2015-01-31 13:57:10 -08:00
Aaron Culliney
a2a55d53ed Fixes for various clang static analyzer issues 2014-10-25 11:53:44 -07:00
Aaron Culliney
29e8502f23 Silence compiler warnings on Mac 2014-10-25 10:18:22 -07:00
Aaron Culliney
5083aac4b7 silence compiler warnings 2014-06-14 12:19:15 -07:00