mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-24 00:21:05 +08:00
radio project can play mp3/wav file.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@175 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -540,6 +540,8 @@ void filelist_view_destroy(filelist_view_t* view)
|
||||
rtgui_image_destroy(file_image);
|
||||
rtgui_image_destroy(folder_image);
|
||||
|
||||
filelist_view = RT_NULL;
|
||||
|
||||
/* destroy view */
|
||||
rtgui_widget_destroy(RTGUI_WIDGET(view));
|
||||
}
|
||||
|
||||
@@ -283,6 +283,22 @@ int mp3_decoder_run(struct mp3_decoder* decoder)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* audio information structure */
|
||||
struct audio_info
|
||||
{
|
||||
char* title;
|
||||
char* artist;
|
||||
|
||||
rt_uint32_t duration;
|
||||
rt_uint32_t bit_rate;
|
||||
rt_uint32_t sampling;
|
||||
};
|
||||
|
||||
/* get mp3 information */
|
||||
void mp3_get_info(char* filename, struct audio_info* info)
|
||||
{
|
||||
}
|
||||
|
||||
#include <finsh.h>
|
||||
rt_size_t fd_fetch(void* parameter, rt_uint8_t *buffer, rt_size_t length)
|
||||
{
|
||||
|
||||
+494
-6
File diff suppressed because it is too large
Load Diff
@@ -144,6 +144,7 @@ rtgui_modal_code_t rtgui_view_show(rtgui_view_t* view, rt_bool_t is_modal)
|
||||
if (RTGUI_WIDGET_IS_FOCUSABLE(RTGUI_WIDGET(view)))
|
||||
rtgui_widget_focus(RTGUI_WIDGET(view));
|
||||
|
||||
view->modal_show = is_modal;
|
||||
if (is_modal == RT_TRUE)
|
||||
{
|
||||
/* set modal mode */
|
||||
|
||||
@@ -164,9 +164,6 @@ rt_bool_t rtgui_workbench_event_loop(rtgui_workbench_t* workbench)
|
||||
char event_buf[256];
|
||||
struct rtgui_event* event = (struct rtgui_event*)&event_buf[0];
|
||||
|
||||
/* show workbench firstly */
|
||||
rtgui_workbench_show(workbench);
|
||||
|
||||
if (workbench->flag & RTGUI_WORKBENCH_FLAG_MODAL_MODE)
|
||||
{
|
||||
/* event loop for modal mode shown view */
|
||||
@@ -180,6 +177,9 @@ rt_bool_t rtgui_workbench_event_loop(rtgui_workbench_t* workbench)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* show workbench firstly */
|
||||
rtgui_workbench_show(workbench);
|
||||
|
||||
while (!(workbench->flag & RTGUI_WORKBENCH_FLAG_CLOSED))
|
||||
{
|
||||
if (rtgui_thread_recv(event, sizeof(event_buf)) == RT_EOK)
|
||||
|
||||
Reference in New Issue
Block a user