From c1a01beded5103df32ea2e3ec596e80de740cf2e Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 8 Dec 2017 13:01:25 -0500 Subject: 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 --- apps/buffering.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/buffering.c') 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); } -- cgit v1.2.3