Aaron Culliney
abae59767c
Enable simple heap memory fencing/scribbling in debug builds
2015-12-31 22:50:43 -08:00
Aaron Culliney
9fd288c0b9
Remove aggressive assert that fired on Cyanogen device (even with a valid CPU pause/resume lifecycle) ...
2015-12-20 15:04:20 -08:00
Aaron Culliney
05698c6a5e
Avoid another audio buffer overflow manifesting on Kindle
2015-11-29 22:14:55 -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
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
4742d4e03e
Misc moar logging
2015-10-20 20:51:21 -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
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