CURRENT_STATUS_AUDIO_EQUALIZER,
CURRENT_STATUS_PLAYBACK_RATE,
CURRENT_STATUS_STREAMING_PLAYBACK_RATE,
+ CURRENT_STATUS_LATENCY,
CURRENT_STATUS_NEXT_URI,
CURRENT_STATUS_GAPLESS,
CURRENT_STATUS_GET_TRACK_INFO,
g_print(" ==> [Player_Audio_Test] eq bands frequency range: [%d] \n", value);
}
+static void set_latency(int value)
+{
+ int ret = PLAYER_ERROR_NONE;
+
+ if ((ret = player_set_audio_latency_mode(g_player[0], value)))
+ g_print("failed to player_set_audio_latency_mode, ret(0x%x)\n", ret);
+}
+
void quit_program()
{
if (g_pcm_fd)
g_menu_state = CURRENT_STATUS_HANDLE_NUM;
} else if (strncmp(cmd, "tr", 2) == 0) {
g_menu_state = CURRENT_STATUS_PLAYBACK_RATE;
+ } else if (strncmp(cmd, "lt", 2) == 0) {
+ g_menu_state = CURRENT_STATUS_LATENCY;
} else if (strncmp(cmd, "su", 2) == 0) {
g_menu_state = CURRENT_STATUS_NEXT_URI;
} else if (strncmp(cmd, "gu", 2) == 0) {
g_print("[position] j. Set Position \t");
g_print("l. Get Position\n");
g_print("[trick] tr. set playback rate\n");
+ g_print("[latency] lt. Set latency\n");
g_print("[duration] m. Get Duration\n");
g_print("[Stream Info] n. Get stream info (Video Size, codec, audio stream info, and tag info)\n");
g_print("[Looping] o. Set Looping\t");
g_print(" *** input audio eq value.(0: UNSET, 1: SET) \n");
} else if (g_menu_state == CURRENT_STATUS_PLAYBACK_RATE || g_menu_state == CURRENT_STATUS_STREAMING_PLAYBACK_RATE) {
g_print(" *** input playback rate.(-5.0 ~ 5.0)\n");
+ } else if (g_menu_state == CURRENT_STATUS_LATENCY) {
+ g_print(" *** input latency.(0: Low, 1: Mid, 2: High)\n");
} else if (g_menu_state == CURRENT_STATUS_NEXT_URI) {
g_print("*** input next uri.\n");
} else if (g_menu_state == CURRENT_STATUS_GAPLESS) {
reset_menu_state();
}
break;
+ case CURRENT_STATUS_LATENCY:
+ {
+ int value = atoi(cmd);
+ set_latency(value);
+ reset_menu_state();
+ }
+ break;
case CURRENT_STATUS_NEXT_URI:
{
set_next_uri(cmd);