Commit Graph

179 Commits

Author SHA1 Message Date
Aaron Culliney
81941295e6 Refactor : simplify audio buffer API 2015-06-20 00:01:17 -07:00
Aaron Culliney
3ed43fa43c Refactor : remove enumerate devices and other API simplifications 2015-06-19 22:03:48 -07:00
Aaron Culliney
f353a11ec5 Refactor : clarify _this and _internal parameters 2015-06-17 20:54:51 -07:00
Aaron Culliney
5beb1ce476 Fix build break 2015-06-17 20:39:12 -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
72389b941a Refactor : clarify basic subsystem interface 2015-06-16 23:02:25 -07:00
Aaron Culliney
107db0dbde Refactor : remove apparently unneeded call to GetStatus 2015-06-16 22:47:37 -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
6a4fe7bfa1 Refactor : prettify get buffer lock function 2015-06-16 22:28:53 -07:00
Aaron Culliney
e0fe2e62f7 Refactor : remove moar deadcode! 2015-06-16 22:19:19 -07:00
Aaron Culliney
f41dc9b68a Refactor : remove enumerated audio devices from file scope and eliminate \n from logs 2015-06-16 22:17:18 -07:00
Aaron Culliney
26d3cda215 Refactor : initialization and shutdown codepath cleanup 2015-06-16 21:45:45 -07:00
Aaron Culliney
43d98235fd Refactor : cleaned up a bit of deadcode 2015-06-16 21:33:31 -07:00
Aaron Culliney
a2663298d1 Refactor : coalesce two structs into one for clarity 2015-06-16 21:18:52 -07:00
Aaron Culliney
ba42037473 Refactor : remove PVOICE typedef 2015-06-16 20:41:18 -07:00
Aaron Culliney
7552d64d74 Refactor : rename variable for clarity 2015-06-15 22:33:18 -07:00
Aaron Culliney
6a12ae4081 Refactor : simplify function-pointer assignment 2015-06-15 22:24:51 -07:00
Aaron Culliney
538b0aacd7 Refactor : rename some structures for clarity 2015-06-15 22:19:23 -07:00
Aaron Culliney
aedada03e9 Refactor : remove unused ivars 2015-06-15 22:07:09 -07:00
Aaron Culliney
d6b5c19584 Refactor : rename a number of structures and constify a few public API methods 2015-06-15 21:50:46 -07:00
Aaron Culliney
8dd82642d3 Refactor : rename audio subsystem initialization and shutdown functions 2015-06-14 15:05:44 -07:00
Aaron Culliney
59e95a19b1 Refactor : add annotations to a few more functions 2015-06-14 14:56:53 -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
7fd1b350c2 Refactor : hide non-public OpenAL internal API 2015-06-14 14:07:33 -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
27a3fea005 Refactor : kill ds-shim.h 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
Aaron Culliney
4d0ca2b6e3 Refactor : move another function to mockingboard module 2015-06-14 14:07:33 -07:00
Aaron Culliney
1679b8e76a Refactor : excised more DS deadc0de 2015-06-14 14:07:33 -07:00
Aaron Culliney
3767f55846 Refactor : rename and coalesce audio buffer initialization structs 2015-06-14 14:07:33 -07:00
Aaron Culliney
49d2fe6e09 Refactor : excise deadc0de 2015-06-14 14:07:32 -07:00
Aaron Culliney
1707c60701 Refactor : completely excise win-shim
- Moves remaining shim code into mockingboard.c
    - Breaks Mac builds for now =P
2015-06-14 14:07:32 -07:00
Aaron Culliney
994e1a4568 Refactor FALSE -> false 2015-06-14 14:07:32 -07:00
Aaron Culliney
f89c734996 Refactor : excise various macro defs 2015-06-14 14:07:32 -07:00
Aaron Culliney
b9371d3a38 Refactor : LPDWORD > unsigned long* 2015-06-14 14:07:32 -07:00
Aaron Culliney
7513f5e938 Refactor UINT -> unsigned int 2015-06-14 14:07:32 -07:00
Aaron Culliney
92f21a65ca Refactor : LPVOID > void* 2015-06-14 14:07:32 -07:00
Aaron Culliney
e63afea069 Refactor : excise LPBYTE, LPLONG 2015-06-14 14:07:32 -07:00
Aaron Culliney
8cba7de872 Refactor : excise unused macro defs 2015-06-14 14:07:32 -07:00
Aaron Culliney
7263e161e4 Refactor : LONG -> long 2015-06-14 14:07:32 -07:00
Aaron Culliney
5312ddee00 Refactor : ULONG -> unsigned long 2015-06-14 14:07:32 -07:00
Aaron Culliney
109dfa855b Refactor : DWORD -> unsigned long 2015-06-14 14:07:32 -07:00
Aaron Culliney
7051e6d906 Refactor : SHORT -> int16_t 2015-06-14 14:07:32 -07:00
Aaron Culliney
57cd12f1cc Refactor : BYTE -> uint8_t 2015-06-14 14:07:32 -07:00
Aaron Culliney
6d252b0b3e Refactor : WORD -> uint16_t 2015-06-14 14:07:32 -07:00
Aaron Culliney
4b28e33906 Refactor USHORT -> uint16_t 2015-06-14 14:07:32 -07:00
Aaron Culliney
a5d36c7dff Refactor : remove unused macro defs 2015-06-14 14:07:32 -07:00
Aaron Culliney
a46a882a3d Refactor length types 2015-06-14 14:07:32 -07:00
Aaron Culliney
c5fb837314 Refactor BOOL -> bool 2015-06-14 14:07:32 -07:00
Aaron Culliney
87e7ec24ff Refactor HRESULT -> int 2015-06-14 14:07:32 -07:00
Aaron Culliney
3b13fc29a4 Don't leak stuff-n-things, thank you Valgrind =)
- Major : Previously leaking interface threads
    - Major : Leak of FILE* resources in inflate routine
    - Minor : previous leak-on-exit of enumerated sound devices
2015-05-31 14:11:57 -07:00
Aaron Culliney
36b78f657f Remove an uppity assert
- Manifesting on Mac ... believed to be spurious and more fallout from auto-speed adjustment refactor
2015-03-10 10:22:47 -07:00
Aaron Culliney
815b6f5a7c REFACTOR : soundcore to use logging macros 2015-02-17 16:14:25 -08: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
381d97c485 Preliminary VBL support sourced from AppleWin 2015-01-10 16:17:18 -08:00
Aaron Culliney
af706e7602 rename read_random to avoid namespace collison on Mac 2014-12-29 19:07:43 -08:00
Aaron Culliney
031a8f51f8 Prevent some segfaults when shutting down on Linux 2014-12-21 13:51:45 -08:00
Aaron Culliney
101e507add Adds a VM tracing facility and functionality test 2014-11-23 14:03:18 -08:00
Aaron Culliney
9f1c54e555 Expose c_read_random() 2014-11-19 19:59:39 -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
551cc00781 Silence a number of clang compiler warnings on Linux 2014-10-25 08:44:21 -07:00
Aaron Culliney
e941d5b10f First cut at getting audio working on Mac 2014-10-12 12:14:13 -07:00
Aaron Culliney
13d17af838 Simplify OpenAL code 2014-10-12 10:46:12 -07:00
Aaron Culliney
0b9515f2cd Excise ALSA, only use OpenAL 2014-10-09 21:17:54 -07:00
Aaron Culliney
8621b1ac53 Refactor: macro should be capitalized 2014-09-06 19:47:59 -07:00
Aaron Culliney
5083aac4b7 silence compiler warnings 2014-06-14 12:19:15 -07:00
Aaron Culliney
87a34d2d97 Remove compiler pragmas and silence a spurious assert 2014-06-14 12:13:49 -07:00
Aaron Culliney
1649419b39 Fixe unused variable warnings 2014-06-14 11:50:50 -07:00
Aaron Culliney
126d049ffc Refactor to two jump vectors
* Believe needed to allow minimal change for x86_64 codepath
2014-06-07 16:05:38 -07:00
Aaron Culliney
360c2fded1 Work around an abort in mockingboard for now 2014-05-11 13:55:54 -07:00
Aaron Culliney
9ff453be23 Beginning to refactor memory.S -> vm.c 2014-05-10 11:55:41 -07:00
Aaron Culliney
4ce4a37dd3 silence some printouts 2014-02-01 12:18:07 -08:00
asc
1009d4e708 Move soundcore-alsa to correct location
* Also these files are deprecated
2014-01-25 13:49:37 -08:00
asc
3abd2e87aa Refactor to use GNU build tools
* Added configure.ac and non-recursive Makefile.am
    * Modularized source into subdirectories
    * Simplified header inclusion
2014-01-22 20:51:50 -08:00