Commit 14410c47 authored by Gildas Bazin's avatar Gildas Bazin

* src/input/stream.c: decrease memory requirements for WinCE.

parent 069e1662
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#include "input_internal.h" #include "input_internal.h"
#ifdef UNDER_CE
# define LOW_MEM
#endif
/* TODO: /* TODO:
* - tune the 2 methods * - tune the 2 methods
* - compute cost for seek * - compute cost for seek
...@@ -42,15 +46,21 @@ ...@@ -42,15 +46,21 @@
*/ */
/* How many track we have, currently only used for stream mode */ /* How many track we have, currently only used for stream mode */
#define STREAM_CACHE_TRACK 3 #ifdef LOW_MEM
/* Max size of our cache 4Mo per track */ # define STREAM_CACHE_TRACK 1
#define STREAM_CACHE_SIZE (4*STREAM_CACHE_TRACK*1024*1024) /* Max size of our cache 128Ko per track */
/* How many data we try to prebuffer */ # define STREAM_CACHE_SIZE (STREAM_CACHE_TRACK*1024*128)
#else
# define STREAM_CACHE_TRACK 3
/* Max size of our cache 4Mo per track */
# define STREAM_CACHE_SIZE (4*STREAM_CACHE_TRACK*1024*1024)
#endif
/* How many data we try to prebuffer */
#define STREAM_CACHE_PREBUFFER_SIZE (32767) #define STREAM_CACHE_PREBUFFER_SIZE (32767)
/* Maximum time we take to pre-buffer */ /* Maximum time we take to pre-buffer */
#define STREAM_CACHE_PREBUFFER_LENGTH (100*1000) #define STREAM_CACHE_PREBUFFER_LENGTH (100*1000)
/* Method1: Simple, for pf_block. /* Method1: Simple, for pf_block.
* We get blocks and put them in the linked list. * We get blocks and put them in the linked list.
* We release blocks once the total size is bigger than CACHE_BLOCK_SIZE * We release blocks once the total size is bigger than CACHE_BLOCK_SIZE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment