567
社区成员




void test_store_restore_update_progress_time(void)
{
mdi_audio_get_progress_time(&progress_time);
}
void test_store_restore_callback(mdi_result result)
{
if (MDI_AUDIO_TERMINATED == result)
{
mdi_audio_store_file(0);
}
}
BOOL test_store_restore_mdi_callback(mdi_result result)
{
mdi_audio_restore_file_with_vol_path(
L"d:\\text\\test.mp3",
DEVICE_AUDIO_PLAY_ONCE,
NULL,
test_store_restore_callback,
MDI_AUD_VOL_EX(6),
MDI_AUD_PTH_EX(MDI_DEVICE_SPEAKER2));
return TRUE;
}
// 主函数
void test_store_restore_play(void)
{
mdi_result result;
progress_time = 0;
mdi_audio_set_background_handler(MDI_BACKGROUND_APP_AUDPLY, test_store_restore_mdi_callback);
result = mdi_audio_play_file_portion_with_vol_path(
L"d:\\text\\test.mp3",
progress_time,
0,
DEVICE_AUDIO_PLAY_ONCE,
NULL,
mmi_audply_play_callback_hdlr,
MDI_AUD_VOL_EX(6),
MDI_AUD_PTH_EX(MDI_DEVICE_SPEAKER2));
if (result != 0)
{
DisplayPopup((U8*)L"ERROR", IMG_GLOBAL_OK, 1, 5000, 13);
return;
}
else
{
StartTimer((U16)SOMUSIC_PLAYER_PROGRESS_CALLBACK_TIMER, 1000, test_store_restore_update_progress_time);
}
}
SetKeyHandler(test_store_restore_play, KEY_LSK, KEY_EVENT_DOWN);