diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 12 |
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 | ||