Aaron Culliney
2ae8468b10
Fix desktop Linux build break
2015-07-12 14:29:47 -07:00
Aaron Culliney
7ca4a2646d
Optimize video drawing and API cleanup
...
- Enforces synchronized access to video dirty bit
2015-07-12 14:13:13 -07:00
Aaron Culliney
da301ded7c
Android build tweaks
...
- Build in ARM mode, not Thumb mode (cpu.S is written in common ARM dialect)
- Include various ABIs (phat APK)
2015-07-12 13:12:44 -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
66978056c9
Build system tweaks
2015-07-07 21:40:48 -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
edaa7be34f
Avoid segfaults and deadlocks in backgrounding/foregrounding on Android
2015-07-05 13:40:50 -07:00
Aaron Culliney
38813bb2a1
Revert "Avoid segfault in render thread on mobile shutdown codepath"
...
This reverts commit ddefceaf08
.
- need an additional boolean instead
2015-07-05 13:29:35 -07:00
Aaron Culliney
4305909d67
Expose some timing constants
2015-07-05 13:17:41 -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
ddefceaf08
Avoid segfault in render thread on mobile shutdown codepath
2015-07-04 18:18:06 -07:00
Aaron Culliney
ada6d7a0be
Pause/resume CPU/audio together
2015-07-04 18:17:04 -07:00
Aaron Culliney
20b3e25915
Renamed to get Android build working
2015-07-04 18:14:21 -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
b717e829a7
Override assert() to get messages
2015-07-04 18:08:43 -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
951b4518c1
Expose device-preferred audio parameters to native
2015-06-28 12:49:26 -07:00
Aaron Culliney
38ef54bf57
Include class to detect audio capabilities of Android device
2015-06-28 11:50:32 -07:00
Aaron Culliney
d01b220b21
Remove spurious checkin
2015-06-28 10:56:11 -07:00
Aaron Culliney
afeffdab79
Tweak to avoid GCC complaint
2015-06-27 13:14:32 -07:00
Aaron Culliney
f0f95a80ff
Project changes insisted upon by Android Studio
2015-06-27 13:12:38 -07:00
Aaron Culliney
9631e1e039
Remove > API 19 method call
2015-06-27 13:12:09 -07:00
Aaron Culliney
a72d6db296
Allow system to handle volume change keys
2015-06-27 12:59:59 -07:00
Aaron Culliney
bb8d51817b
First cut at Android OpenSLES backend
2015-06-27 11:48:00 -07:00
Aaron Culliney
c4397123cb
Assert that there is only one backend renderer
2015-06-22 22:21:27 -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