summaryrefslogtreecommitdiffstats
path: root/apps/buffering.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-12-08 13:01:25 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-12-09 17:05:59 -0500
commitc1a01beded5103df32ea2e3ec596e80de740cf2e (patch)
tree244e086f06172bb1957c45e1c508a1de5ece6964 /apps/buffering.c
parente86ea6bdb9976d5142ba924565dbdf96bf9826a7 (diff)
downloadrockbox-c1a01beded5103df32ea2e3ec596e80de740cf2e.tar.gz
rockbox-c1a01beded5103df32ea2e3ec596e80de740cf2e.zip
Playback: Move internal track list onto buffer
Does away the statically-allocated track list which frees quite a fair amount of in-RAM size. There's no compile-time hard track limit. Recommended TODO (but not right away): Have data small enough use the handle structure as its buffer data area. Almost the entire handle structure is unused for simple allocations without any associated filesystem path. Change-Id: I74a4561e5a837e049811ac421722ec00dadc0d50
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 09b164ea4f..9bc7d730c5 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -43,6 +43,8 @@
/* #define LOGF_ENABLE */
#include "logf.h"
+#define BUF_MAX_HANDLES 384
+
/* macros to enable logf for queues
logging on SYS_TIMEOUT can be disabled */
#ifdef SIMULATOR
@@ -1120,6 +1122,10 @@ bool bufclose(int handle_id)
return true;
}
#endif
+ if (handle_id <= 0) {
+ return true;
+ }
+
LOGFQUEUE("buffering >| Q_CLOSE_HANDLE %d", handle_id);
return queue_send(&buffering_queue, Q_CLOSE_HANDLE, handle_id);
}