summaryrefslogtreecommitdiff
path: root/apps/buffering.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index a821e7f8c7..d963a983a6 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -50,7 +50,7 @@
50#include "pcmbuf.h" 50#include "pcmbuf.h"
51#include "buffer.h" 51#include "buffer.h"
52#include "bmp.h" 52#include "bmp.h"
53#include "events.h" 53#include "appevents.h"
54#include "metadata.h" 54#include "metadata.h"
55 55
56#if MEM > 1 56#if MEM > 1
@@ -600,7 +600,7 @@ static bool buffer_handle(int handle_id)
600 h->filerem = 0; 600 h->filerem = 0;
601 h->available = sizeof(struct mp3entry); 601 h->available = sizeof(struct mp3entry);
602 h->widx += sizeof(struct mp3entry); 602 h->widx += sizeof(struct mp3entry);
603 send_event(EVENT_HANDLE_FINISHED, &h->id); 603 send_event(BUFFER_EVENT_FINISHED, &h->id);
604 return true; 604 return true;
605 } 605 }
606 606
@@ -673,7 +673,7 @@ static bool buffer_handle(int handle_id)
673 /* finished buffering the file */ 673 /* finished buffering the file */
674 close(h->fd); 674 close(h->fd);
675 h->fd = -1; 675 h->fd = -1;
676 send_event(EVENT_HANDLE_FINISHED, &h->id); 676 send_event(BUFFER_EVENT_FINISHED, &h->id);
677 } 677 }
678 678
679 return true; 679 return true;
@@ -729,7 +729,7 @@ static void rebuffer_handle(int handle_id, size_t newpos)
729 /* There isn't enough space to rebuffer all of the track from its new 729 /* There isn't enough space to rebuffer all of the track from its new
730 offset, so we ask the user to free some */ 730 offset, so we ask the user to free some */
731 DEBUGF("rebuffer_handle: space is needed\n"); 731 DEBUGF("rebuffer_handle: space is needed\n");
732 send_event(EVENT_HANDLE_REBUFFER, &handle_id); 732 send_event(BUFFER_EVENT_REBUFFER, &handle_id);
733 } 733 }
734 734
735 /* Now we ask for a rebuffer */ 735 /* Now we ask for a rebuffer */
@@ -1339,7 +1339,7 @@ void buffering_thread(void)
1339 LOGFQUEUE("buffering < Q_START_FILL %d", (int)ev.data); 1339 LOGFQUEUE("buffering < Q_START_FILL %d", (int)ev.data);
1340 /* Call buffer callbacks here because this is one of two ways 1340 /* Call buffer callbacks here because this is one of two ways
1341 * to begin a full buffer fill */ 1341 * to begin a full buffer fill */
1342 send_event(EVENT_BUFFER_LOW, 0); 1342 send_event(BUFFER_EVENT_BUFFER_LOW, 0);
1343 shrink_buffer(); 1343 shrink_buffer();
1344 queue_reply(&buffering_queue, 1); 1344 queue_reply(&buffering_queue, 1);
1345 filling |= buffer_handle((int)ev.data); 1345 filling |= buffer_handle((int)ev.data);
@@ -1401,7 +1401,7 @@ void buffering_thread(void)
1401 1401
1402 /* If the buffer is low, call the callbacks to get new data */ 1402 /* If the buffer is low, call the callbacks to get new data */
1403 if (num_handles > 0 && data_counters.useful <= conf_watermark) 1403 if (num_handles > 0 && data_counters.useful <= conf_watermark)
1404 send_event(EVENT_BUFFER_LOW, 0); 1404 send_event(BUFFER_EVENT_BUFFER_LOW, 0);
1405 1405
1406#if 0 1406#if 0
1407 /* TODO: This needs to be fixed to use the idle callback, disable it 1407 /* TODO: This needs to be fixed to use the idle callback, disable it
@@ -1411,7 +1411,7 @@ void buffering_thread(void)
1411 else if (ata_disk_is_active() && queue_empty(&buffering_queue)) 1411 else if (ata_disk_is_active() && queue_empty(&buffering_queue))
1412 { 1412 {
1413 if (num_handles > 0 && data_counters.useful <= high_watermark) 1413 if (num_handles > 0 && data_counters.useful <= high_watermark)
1414 send_event(EVENT_BUFFER_LOW, 0); 1414 send_event(BUFFER_EVENT_BUFFER_LOW, 0);
1415 1415
1416 if (data_counters.remaining > 0 && BUF_USED <= high_watermark) 1416 if (data_counters.remaining > 0 && BUF_USED <= high_watermark)
1417 { 1417 {