mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-20 02:22:43 -05:00
XWorld: some fixes
Fixes sound on most platforms, original root cause was bad menu code as well as DMA callbacks taking too long. Worked around with smaller chunk sizes. Permanent fix would include moving mixing out of the callback. Rewrites input with code from rockboy/doom. Cherry-picks a change from Gregory Montoir's `rawgl' to patch the code wheel screen. Finally, adds a motion blur filter on select targets. Change-Id: I8df549c923c5075800c6625c36c8202e53de1d27
This commit is contained in:
parent
deaeb73912
commit
05733649bc
10 changed files with 347 additions and 141 deletions
|
|
@ -24,7 +24,7 @@
|
|||
#include "serializer.h"
|
||||
#include "sys.h"
|
||||
|
||||
static int8_t ICODE_ATTR addclamp(int a, int b) {
|
||||
static int8_t addclamp(int a, int b) {
|
||||
int add = a + b;
|
||||
if (add < -128) {
|
||||
add = -128;
|
||||
|
|
@ -121,11 +121,11 @@ void mixer_stopAll(struct Mixer* mx) {
|
|||
/* Since there is no way to know when SDL will ask for a buffer fill, we need */
|
||||
/* to synchronize with a mutex so the channels remain stable during the execution */
|
||||
/* of this method. */
|
||||
static void ICODE_ATTR mixer_mix(struct Mixer* mx, int8_t *buf, int len) {
|
||||
static void mixer_mix(struct Mixer* mx, int8_t *buf, int len) {
|
||||
int8_t *pBuf;
|
||||
|
||||
struct MutexStack_t ms;
|
||||
MutexStack(&ms, mx->sys, mx->_mutex);
|
||||
/* disabled because this will be called in IRQ */
|
||||
/*sys_lockMutex(mx->sys, mx->_mutex);*/
|
||||
|
||||
/* Clear the buffer since nothing guarantees we are receiving clean memory. */
|
||||
rb->memset(buf, 0, len);
|
||||
|
|
@ -170,11 +170,10 @@ static void ICODE_ATTR mixer_mix(struct Mixer* mx, int8_t *buf, int len) {
|
|||
|
||||
}
|
||||
|
||||
MutexStack_destroy(&ms);
|
||||
/*sys_unlockMutex(mx->sys, mx->_mutex);*/
|
||||
}
|
||||
|
||||
static void ICODE_ATTR mixer_mixCallback(void *param, uint8_t *buf, int len) {
|
||||
debug(DBG_SND, "mixer_mixCallback");
|
||||
static void mixer_mixCallback(void *param, uint8_t *buf, int len) {
|
||||
mixer_mix((struct Mixer*)param, (int8_t *)buf, len);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue