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
aa5b9eb971
Safer CPU/audio lifecycle management that appears to fix a deadlock on Kindle Fire 1st Gen
2015-10-02 00:11:49 -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
f343ad9dbd
Get Mockingboard working somewhat better
2015-09-13 12:43:34 -07:00
Aaron Culliney
d263478e83
Use calloc() for soundcore allocations
...
- Avoids potential for transacting upon uninitialized memory, thank you Valgrind
2015-09-12 15:04:09 -07:00
Aaron Culliney
ed60b2ea73
Refactor VM initialization and shutdown
2015-09-11 23:03:17 -07:00
Aaron Culliney
ea43b56644
Avoid leaking PQList_s
2015-09-07 11:27:32 -07:00
Aaron Culliney
2cbc53ef45
Correctly zero-out entire structure
2015-09-07 11:07:49 -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
a1c497bfa0
Lightly refactor testing codepaths for desktop Linux and Android
2015-09-06 22:10:25 -07:00
Aaron Culliney
f95a00df7b
Silence some Clang complaints
2015-09-06 13:55:17 -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
36baaa04d5
Allow dynamic configuration of audio latency
...
- This allows for user-configured device-specific tuning (which makes sense in the Android world with 10,000+
different devices out there ;-)
2015-07-25 12:57:16 -07:00
Aaron Culliney
bca223780c
Properly set speaker volume
2015-07-24 22:21:01 -07:00
Aaron Culliney
5291ee750d
Add MB_ISEnabled() function
2015-07-23 23:46:23 -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
1b4962169a
Enabled backfilling quiet samples for stereo
...
- This is a bit of a hack that fixes mockingboard glitching
2015-07-08 20:14:16 -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
0cefe60e06
Force OpenSLES to start playback immediately
...
- Without this, mockingboard will queue a few samples on U5 boot, but then it won't restart
2015-07-07 21:32:43 -07:00
Aaron Culliney
dfbb13906a
Working buffer size should be around 0.1-0.3 sec of data
...
- This appears to work on a wide grange of older Gingerbread through to the latest Nexus class devices
- TODO : we really should write a dynamic calculation/adjustment routine to determine the best working buffer for
any device this code runs on =)
2015-07-05 13:16:20 -07:00
Aaron Culliney
8ecab7cf91
Eliminate using a local variable
2015-07-05 12:58:43 -07:00
Aaron Culliney
e04f5c046c
Just use the workingBytes for bytes_queued calculation
2015-07-05 12:57:24 -07:00
Aaron Culliney
c036c8dc84
Defensive coding around case where backend soundsystem is unavailable
2015-07-04 18:13:01 -07:00
Aaron Culliney
2910b6180e
Avoid speaker_going_silent codepath on Android
2015-07-04 18:11:58 -07:00
Aaron Culliney
43f6eff62e
Avoid segfaults if mockingboard not initialized
2015-07-04 18:11:12 -07:00
Aaron Culliney
2aba9a5ba1
Better OpenSLES backend implementation for Android
...
- Uses buffer values gleaned from Android system
- Removes completely unnecessary playq and uses ringBuffer instead with read/write heads
- ringBuffer includes a certain amount of "overflow" space for callback convenience
2015-07-04 18:01:44 -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
d5b7b5263c
Misc tweaks
2015-06-30 22:10:30 -07:00
Aaron Culliney
d01b220b21
Remove spurious checkin
2015-06-28 10:56:11 -07:00
Aaron Culliney
bb8d51817b
First cut at Android OpenSLES backend
2015-06-27 11:48:00 -07:00
Aaron Culliney
5b7afea0b4
Refactor : use the new common playqueue code
2015-06-22 22:21:09 -07:00
Aaron Culliney
7a2d1725c7
A simple audio buffer play queue implementation
2015-06-22 22:20:32 -07:00
Aaron Culliney
be7a6267e2
Refactor : call openal_systemShutdown from failed creation
2015-06-20 14:28:27 -07:00
Aaron Culliney
20054a9171
Refactor : avoid early return
2015-06-20 13:49:35 -07:00
Aaron Culliney
2839e92ce4
Refactor : simplify check for available buffers
2015-06-20 13:16:24 -07:00
Aaron Culliney
9a7090c3a4
Refactor : begin excising use of uthash
...
- While uthash is excellent, it is too heavyweight for a custom collection that has a maximum of 4 elements
2015-06-20 13:02:18 -07:00
Aaron Culliney
2824dfa752
Refactor : clarify buffer play list variable
2015-06-20 12:18:42 -07:00
Aaron Culliney
0aecc83744
Refactor : shuffle moar code around for clarity
2015-06-20 12:11:53 -07:00
Aaron Culliney
8ab4c18de5
Refactor : shuffled code locations to eliminate forward declarations
2015-06-20 11:51:15 -07:00
Aaron Culliney
7b0c5be7c8
Refactor : style and API cleanups
2015-06-20 11:39:23 -07:00
Aaron Culliney
b5ebec1939
Refactor : various style tweaks and optimizations
2015-06-20 11:19:29 -07:00
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