summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorTomasz Malesinski <tomal@rockbox.org>2006-08-12 23:01:52 +0000
committerTomasz Malesinski <tomal@rockbox.org>2006-08-12 23:01:52 +0000
commit28910e7e17786607d0286f2901d77a83d55a7f2c (patch)
treeaf59a984937d627f40dc93b63a17f124bc7aa155 /apps/playback.c
parentc1810b31f170e887668652ff4e3d76c392a5fb70 (diff)
downloadrockbox-28910e7e17786607d0286f2901d77a83d55a7f2c.tar.gz
rockbox-28910e7e17786607d0286f2901d77a83d55a7f2c.zip
Various lower limits and sizes for targets with 1MB of RAM (Iriver iFP7xx).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10556 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 11d266b92f..04f67ef4fb 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -136,8 +136,13 @@ enum {
136}; 136};
137 137
138/* As defined in plugins/lib/xxx2wav.h */ 138/* As defined in plugins/lib/xxx2wav.h */
139#if MEMORYSIZE > 1
139#define MALLOC_BUFSIZE (512*1024) 140#define MALLOC_BUFSIZE (512*1024)
140#define GUARD_BUFSIZE (32*1024) 141#define GUARD_BUFSIZE (32*1024)
142#else
143#define MALLOC_BUFSIZE (100*1024)
144#define GUARD_BUFSIZE (8*1024)
145#endif
141 146
142/* As defined in plugin.lds */ 147/* As defined in plugin.lds */
143#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 148#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
@@ -2930,11 +2935,14 @@ void audio_set_crossfade(int enable)
2930 size_t size; 2935 size_t size;
2931 bool was_playing = (playing && audio_is_initialized); 2936 bool was_playing = (playing && audio_is_initialized);
2932 size_t offset = 0; 2937 size_t offset = 0;
2938#if MEMORYSIZE > 1
2933 int seconds = 1; 2939 int seconds = 1;
2940#endif
2934 2941
2935 if (!filebuf) 2942 if (!filebuf)
2936 return; /* Audio buffers not yet set up */ 2943 return; /* Audio buffers not yet set up */
2937 2944
2945#if MEMORYSIZE > 1
2938 if (enable) 2946 if (enable)
2939 seconds = global_settings.crossfade_fade_out_delay 2947 seconds = global_settings.crossfade_fade_out_delay
2940 + global_settings.crossfade_fade_out_duration; 2948 + global_settings.crossfade_fade_out_duration;
@@ -2943,6 +2951,10 @@ void audio_set_crossfade(int enable)
2943 seconds += 2; 2951 seconds += 2;
2944 logf("buf len: %d", seconds); 2952 logf("buf len: %d", seconds);
2945 size = seconds * (NATIVE_FREQUENCY*4); 2953 size = seconds * (NATIVE_FREQUENCY*4);
2954#else
2955 enable = 0;
2956 size = NATIVE_FREQUENCY*2;
2957#endif
2946 if (pcmbuf_get_bufsize() == size) 2958 if (pcmbuf_get_bufsize() == size)
2947 return ; 2959 return ;
2948 2960