diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/audio.h | 30 | ||||
-rw-r--r-- | firmware/mpeg.c | 6 |
2 files changed, 9 insertions, 27 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h index c39fca428c..49ff4c168a 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h | |||
@@ -77,49 +77,31 @@ struct audio_debug | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | void audio_init(void); | 79 | void audio_init(void); |
80 | void audio_wait_for_init(void); | 80 | void audio_play(const long offset); |
81 | void audio_play(long offset); | ||
82 | void audio_stop(void); | 81 | void audio_stop(void); |
83 | void audio_pause(void); | 82 | void audio_pause(void); |
84 | void audio_resume(void); | 83 | void audio_resume(void); |
85 | void audio_next(void); | 84 | void audio_next(void); |
86 | void audio_prev(void); | 85 | void audio_prev(void); |
87 | int audio_status(void); | 86 | int audio_status(void); |
88 | #if CONFIG_CODEC == SWCODEC | 87 | void audio_ff_rewind(const long newtime); |
89 | int audio_track_count(void); /* SWCODEC only */ | ||
90 | long audio_filebufused(void); /* SWCODEC only */ | ||
91 | void audio_pre_ff_rewind(void); /* SWCODEC only */ | ||
92 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
93 | void audio_ff_rewind(long newtime); | ||
94 | void audio_flush_and_reload_tracks(void); | 88 | void audio_flush_and_reload_tracks(void); |
95 | #ifdef HAVE_ALBUMART | ||
96 | int audio_current_aa_hid(void); | ||
97 | #endif | ||
98 | struct mp3entry* audio_current_track(void); | 89 | struct mp3entry* audio_current_track(void); |
99 | struct mp3entry* audio_next_track(void); | 90 | struct mp3entry* audio_next_track(void); |
100 | bool audio_has_changed_track(void); | 91 | bool audio_has_changed_track(void); |
101 | void audio_get_debugdata(struct audio_debug *dbgdata); | 92 | void audio_get_debugdata(struct audio_debug *dbgdata); |
102 | void audio_set_crossfade(int type); | ||
103 | #ifndef HAVE_FLASH_STORAGE | 93 | #ifndef HAVE_FLASH_STORAGE |
104 | void audio_set_buffer_margin(int seconds); | 94 | void audio_set_buffer_margin(const int seconds); |
105 | #endif | 95 | #endif |
106 | unsigned int audio_error(void); | 96 | unsigned int audio_error(void); |
107 | void audio_error_clear(void); | 97 | void audio_error_clear(void); |
108 | int audio_get_file_pos(void); | 98 | int audio_get_file_pos(void); |
109 | void audio_beep(int duration); | 99 | void audio_beep(int duration); |
110 | void audio_init_playback(void); | 100 | void audio_init_playback(void); |
111 | /* Required call when audio buffer is require for some other purpose */ | ||
112 | unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); | ||
113 | /* Stops audio from serving playback */ | ||
114 | void audio_hard_stop(void); | ||
115 | /* Retores the audio buffer to handle the requested playback */ | ||
116 | enum | ||
117 | { | ||
118 | AUDIO_WANT_PLAYBACK = 0, | ||
119 | AUDIO_WANT_VOICE, | ||
120 | }; | ||
121 | 101 | ||
122 | bool audio_restore_playback(int type); | 102 | /* Required call when audio buffer is required for some other purpose */ |
103 | unsigned char *audio_get_buffer(const bool talk_buf, size_t *buffer_size); | ||
104 | /* only implemented in playback.c, but called from firmware */ | ||
123 | 105 | ||
124 | /* channel modes */ | 106 | /* channel modes */ |
125 | enum rec_channel_modes | 107 | enum rec_channel_modes |
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 11cbcdcb68..78824cfe36 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -533,7 +533,7 @@ static void recalculate_watermark(int bitrate) | |||
533 | } | 533 | } |
534 | 534 | ||
535 | #ifndef HAVE_FLASH_STORAGE | 535 | #ifndef HAVE_FLASH_STORAGE |
536 | void audio_set_buffer_margin(int seconds) | 536 | void audio_set_buffer_margin(const int seconds) |
537 | { | 537 | { |
538 | low_watermark_margin = seconds; | 538 | low_watermark_margin = seconds; |
539 | } | 539 | } |
@@ -2627,7 +2627,7 @@ void audio_set_recording_options(struct audio_recording_options *options) | |||
2627 | #endif /* SIMULATOR */ | 2627 | #endif /* SIMULATOR */ |
2628 | #endif /* CONFIG_CODEC == MAS3587F */ | 2628 | #endif /* CONFIG_CODEC == MAS3587F */ |
2629 | 2629 | ||
2630 | void audio_play(long offset) | 2630 | void audio_play(const long offset) |
2631 | { | 2631 | { |
2632 | #ifdef SIMULATOR | 2632 | #ifdef SIMULATOR |
2633 | char* trackname; | 2633 | char* trackname; |
@@ -2768,7 +2768,7 @@ void audio_prev(void) | |||
2768 | #endif /* SIMULATOR */ | 2768 | #endif /* SIMULATOR */ |
2769 | } | 2769 | } |
2770 | 2770 | ||
2771 | void audio_ff_rewind(long newtime) | 2771 | void audio_ff_rewind(const long newtime) |
2772 | { | 2772 | { |
2773 | #ifndef SIMULATOR | 2773 | #ifndef SIMULATOR |
2774 | queue_post(&mpeg_queue, MPEG_FF_REWIND, newtime); | 2774 | queue_post(&mpeg_queue, MPEG_FF_REWIND, newtime); |