summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c10
-rw-r--r--apps/plugin.c5
-rw-r--r--apps/recorder/pcm_record.c7
-rw-r--r--apps/tagcache.c3
4 files changed, 6 insertions, 19 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index e93feb6abb..a7b16d8b1b 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2076,13 +2076,10 @@ int playlist_create(const char *dir, const char *file)
2076 2076
2077 if (file) 2077 if (file)
2078 { 2078 {
2079 /* dummy ops with no callbacks, needed because by
2080 * default buflib buffers can be moved around which must be avoided */
2081 static struct buflib_callbacks dummy_ops;
2082 int handle; 2079 int handle;
2083 size_t buflen; 2080 size_t buflen;
2084 /* use mp3 buffer for maximum load speed */ 2081 /* use mp3 buffer for maximum load speed */
2085 handle = core_alloc_maximum("temp", &buflen, &dummy_ops); 2082 handle = core_alloc_maximum("temp", &buflen, &buflib_ops_locked);
2086 if (handle > 0) 2083 if (handle > 0)
2087 { 2084 {
2088 /* load the playlist file */ 2085 /* load the playlist file */
@@ -2119,13 +2116,10 @@ int playlist_resume(void)
2119 bool sorted = true; 2116 bool sorted = true;
2120 int result = -1; 2117 int result = -1;
2121 2118
2122 /* dummy ops with no callbacks, needed because by
2123 * default buflib buffers can be moved around which must be avoided */
2124 static struct buflib_callbacks dummy_ops;
2125 /* use mp3 buffer for maximum load speed */ 2119 /* use mp3 buffer for maximum load speed */
2126 if (core_allocatable() < (1 << 10)) 2120 if (core_allocatable() < (1 << 10))
2127 talk_buffer_set_policy(TALK_BUFFER_LOOSE); /* back off voice buffer */ 2121 talk_buffer_set_policy(TALK_BUFFER_LOOSE); /* back off voice buffer */
2128 handle = core_alloc_maximum("temp", &buflen, &dummy_ops); 2122 handle = core_alloc_maximum("temp", &buflen, &buflib_ops_locked);
2129 if (handle < 0) 2123 if (handle < 0)
2130 { 2124 {
2131 splashf(HZ * 2, "%s(): OOM", __func__); 2125 splashf(HZ * 2, "%s(): OOM", __func__);
diff --git a/apps/plugin.c b/apps/plugin.c
index aa69b9ca03..8434fea07d 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -990,14 +990,11 @@ void* plugin_get_buffer(size_t *buffer_size)
990 */ 990 */
991static void* plugin_get_audio_buffer(size_t *buffer_size) 991static void* plugin_get_audio_buffer(size_t *buffer_size)
992{ 992{
993 /* dummy ops with no callbacks, needed because by
994 * default buflib buffers can be moved around which must be avoided */
995 static struct buflib_callbacks dummy_ops;
996 if (plugin_buffer_handle <= 0) 993 if (plugin_buffer_handle <= 0)
997 { 994 {
998 plugin_buffer_handle = core_alloc_maximum("plugin audio buf", 995 plugin_buffer_handle = core_alloc_maximum("plugin audio buf",
999 &plugin_buffer_size, 996 &plugin_buffer_size,
1000 &dummy_ops); 997 &buflib_ops_locked);
1001 } 998 }
1002 999
1003 if (buffer_size) 1000 if (buffer_size)
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c
index ef10f8a433..0f6e8469ec 100644
--- a/apps/recorder/pcm_record.c
+++ b/apps/recorder/pcm_record.c
@@ -1406,12 +1406,9 @@ static int pcmrec_handle;
1406static void on_init_recording(void) 1406static void on_init_recording(void)
1407{ 1407{
1408 send_event(RECORDING_EVENT_START, NULL); 1408 send_event(RECORDING_EVENT_START, NULL);
1409 /* dummy ops with no callbacks, needed because by 1409 /* FIXME: This buffer should play nicer and be shrinkable/movable */
1410 * default buflib buffers can be moved around which must be avoided
1411 * FIXME: This buffer should play nicer and be shrinkable/movable */
1412 static struct buflib_callbacks dummy_ops;
1413 talk_buffer_set_policy(TALK_BUFFER_LOOSE); 1410 talk_buffer_set_policy(TALK_BUFFER_LOOSE);
1414 pcmrec_handle = core_alloc_maximum("pcmrec", &rec_buffer_size, &dummy_ops); 1411 pcmrec_handle = core_alloc_maximum("pcmrec", &rec_buffer_size, &buflib_ops_locked);
1415 if (pcmrec_handle <= 0) 1412 if (pcmrec_handle <= 0)
1416 /* someone is abusing core_alloc_maximum(). Fix this evil guy instead of 1413 /* someone is abusing core_alloc_maximum(). Fix this evil guy instead of
1417 * trying to handle OOM without hope */ 1414 * trying to handle OOM without hope */
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 37f443e036..fc06005c1d 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -328,8 +328,7 @@ static void allocate_tempbuf(void)
328#else /* !__PCTOOL__ */ 328#else /* !__PCTOOL__ */
329 /* Need to pass dummy ops to prevent the buffer being moved 329 /* Need to pass dummy ops to prevent the buffer being moved
330 * out from under us, since we yield during the tagcache commit. */ 330 * out from under us, since we yield during the tagcache commit. */
331 static struct buflib_callbacks dummy_ops; 331 tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &buflib_ops_locked);
332 tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &dummy_ops);
333 if (tempbuf_handle > 0) 332 if (tempbuf_handle > 0)
334 { 333 {
335 tempbuf = core_get_data(tempbuf_handle); 334 tempbuf = core_get_data(tempbuf_handle);