summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index c9f48f2d97..d3e508a159 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -89,7 +89,7 @@ extern int playlist_update_resume_info(const struct mp3entry* id3);
89#define MPEG_PRERECORDING_TICK 104 89#define MPEG_PRERECORDING_TICK 104
90 90
91/* indicator for MPEG_NEED_DATA */ 91/* indicator for MPEG_NEED_DATA */
92#define GENERATE_UNBUFFER_EVENTS ((void*)1) 92#define GENERATE_UNBUFFER_EVENTS 1
93 93
94/* list of tracks in memory */ 94/* list of tracks in memory */
95#define MAX_TRACK_ENTRIES (1<<4) /* Must be power of 2 */ 95#define MAX_TRACK_ENTRIES (1<<4) /* Must be power of 2 */
@@ -2006,7 +2006,7 @@ static void mpeg_thread(void)
2006 break; 2006 break;
2007 2007
2008 case STOP_RECORDING: 2008 case STOP_RECORDING:
2009 queue_post(&mpeg_queue, MPEG_STOP_DONE, NULL); 2009 queue_post(&mpeg_queue, MPEG_STOP_DONE, 0);
2010 /* will close the file */ 2010 /* will close the file */
2011 break; 2011 break;
2012 2012
@@ -2123,7 +2123,7 @@ bool audio_has_changed_track(void)
2123void audio_init_playback(void) 2123void audio_init_playback(void)
2124{ 2124{
2125 init_playback_done = false; 2125 init_playback_done = false;
2126 queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, NULL); 2126 queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, 0);
2127 2127
2128 while(!init_playback_done) 2128 while(!init_playback_done)
2129 sleep_thread(1); 2129 sleep_thread(1);
@@ -2137,7 +2137,7 @@ void audio_init_recording(unsigned int buffer_offset)
2137{ 2137{
2138 buffer_offset = buffer_offset; 2138 buffer_offset = buffer_offset;
2139 init_recording_done = false; 2139 init_recording_done = false;
2140 queue_post(&mpeg_queue, MPEG_INIT_RECORDING, NULL); 2140 queue_post(&mpeg_queue, MPEG_INIT_RECORDING, 0);
2141 2141
2142 while(!init_recording_done) 2142 while(!init_recording_done)
2143 sleep_thread(1); 2143 sleep_thread(1);
@@ -2256,17 +2256,17 @@ void audio_record(const char *filename)
2256 strncpy(recording_filename, filename, MAX_PATH - 1); 2256 strncpy(recording_filename, filename, MAX_PATH - 1);
2257 recording_filename[MAX_PATH - 1] = 0; 2257 recording_filename[MAX_PATH - 1] = 0;
2258 2258
2259 queue_post(&mpeg_queue, MPEG_RECORD, NULL); 2259 queue_post(&mpeg_queue, MPEG_RECORD, 0);
2260} 2260}
2261 2261
2262void audio_pause_recording(void) 2262void audio_pause_recording(void)
2263{ 2263{
2264 queue_post(&mpeg_queue, MPEG_PAUSE_RECORDING, NULL); 2264 queue_post(&mpeg_queue, MPEG_PAUSE_RECORDING, 0);
2265} 2265}
2266 2266
2267void audio_resume_recording(void) 2267void audio_resume_recording(void)
2268{ 2268{
2269 queue_post(&mpeg_queue, MPEG_RESUME_RECORDING, NULL); 2269 queue_post(&mpeg_queue, MPEG_RESUME_RECORDING, 0);
2270} 2270}
2271 2271
2272static void prepend_header(void) 2272static void prepend_header(void)
@@ -2569,7 +2569,7 @@ void audio_new_file(const char *filename)
2569 strncpy(recording_filename, filename, MAX_PATH - 1); 2569 strncpy(recording_filename, filename, MAX_PATH - 1);
2570 recording_filename[MAX_PATH - 1] = 0; 2570 recording_filename[MAX_PATH - 1] = 0;
2571 2571
2572 queue_post(&mpeg_queue, MPEG_NEW_FILE, NULL); 2572 queue_post(&mpeg_queue, MPEG_NEW_FILE, 0);
2573} 2573}
2574 2574
2575unsigned long audio_recorded_time(void) 2575unsigned long audio_recorded_time(void)
@@ -2707,7 +2707,7 @@ void audio_play(long offset)
2707#else /* !SIMULATOR */ 2707#else /* !SIMULATOR */
2708 is_playing = true; 2708 is_playing = true;
2709 2709
2710 queue_post(&mpeg_queue, MPEG_PLAY, (void*)offset); 2710 queue_post(&mpeg_queue, MPEG_PLAY, offset);
2711#endif /* !SIMULATOR */ 2711#endif /* !SIMULATOR */
2712 2712
2713 mpeg_errno = 0; 2713 mpeg_errno = 0;
@@ -2717,7 +2717,7 @@ void audio_stop(void)
2717{ 2717{
2718#ifndef SIMULATOR 2718#ifndef SIMULATOR
2719 mpeg_stop_done = false; 2719 mpeg_stop_done = false;
2720 queue_post(&mpeg_queue, MPEG_STOP, NULL); 2720 queue_post(&mpeg_queue, MPEG_STOP, 0);
2721 while(!mpeg_stop_done) 2721 while(!mpeg_stop_done)
2722 yield(); 2722 yield();
2723#else /* SIMULATOR */ 2723#else /* SIMULATOR */
@@ -2736,7 +2736,7 @@ void audio_stop_recording(void)
2736void audio_pause(void) 2736void audio_pause(void)
2737{ 2737{
2738#ifndef SIMULATOR 2738#ifndef SIMULATOR
2739 queue_post(&mpeg_queue, MPEG_PAUSE, NULL); 2739 queue_post(&mpeg_queue, MPEG_PAUSE, 0);
2740#else /* SIMULATOR */ 2740#else /* SIMULATOR */
2741 is_playing = true; 2741 is_playing = true;
2742 playing = false; 2742 playing = false;
@@ -2747,7 +2747,7 @@ void audio_pause(void)
2747void audio_resume(void) 2747void audio_resume(void)
2748{ 2748{
2749#ifndef SIMULATOR 2749#ifndef SIMULATOR
2750 queue_post(&mpeg_queue, MPEG_RESUME, NULL); 2750 queue_post(&mpeg_queue, MPEG_RESUME, 0);
2751#else /* SIMULATOR */ 2751#else /* SIMULATOR */
2752 is_playing = true; 2752 is_playing = true;
2753 playing = true; 2753 playing = true;
@@ -2759,7 +2759,7 @@ void audio_next(void)
2759{ 2759{
2760#ifndef SIMULATOR 2760#ifndef SIMULATOR
2761 queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA); 2761 queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
2762 queue_post(&mpeg_queue, MPEG_NEXT, NULL); 2762 queue_post(&mpeg_queue, MPEG_NEXT, 0);
2763#else /* SIMULATOR */ 2763#else /* SIMULATOR */
2764 char* file; 2764 char* file;
2765 int steps = 1; 2765 int steps = 1;
@@ -2788,7 +2788,7 @@ void audio_prev(void)
2788{ 2788{
2789#ifndef SIMULATOR 2789#ifndef SIMULATOR
2790 queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA); 2790 queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
2791 queue_post(&mpeg_queue, MPEG_PREV, NULL); 2791 queue_post(&mpeg_queue, MPEG_PREV, 0);
2792#else /* SIMULATOR */ 2792#else /* SIMULATOR */
2793 char* file; 2793 char* file;
2794 int steps = -1; 2794 int steps = -1;
@@ -2815,7 +2815,7 @@ void audio_prev(void)
2815void audio_ff_rewind(long newtime) 2815void audio_ff_rewind(long newtime)
2816{ 2816{
2817#ifndef SIMULATOR 2817#ifndef SIMULATOR
2818 queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime); 2818 queue_post(&mpeg_queue, MPEG_FF_REWIND, newtime);
2819#else /* SIMULATOR */ 2819#else /* SIMULATOR */
2820 (void)newtime; 2820 (void)newtime;
2821#endif /* SIMULATOR */ 2821#endif /* SIMULATOR */
@@ -2824,7 +2824,7 @@ void audio_ff_rewind(long newtime)
2824void audio_flush_and_reload_tracks(void) 2824void audio_flush_and_reload_tracks(void)
2825{ 2825{
2826#ifndef SIMULATOR 2826#ifndef SIMULATOR
2827 queue_post(&mpeg_queue, MPEG_FLUSH_RELOAD, NULL); 2827 queue_post(&mpeg_queue, MPEG_FLUSH_RELOAD, 0);
2828#endif /* !SIMULATOR*/ 2828#endif /* !SIMULATOR*/
2829} 2829}
2830 2830