package schedule

import (
	. "netease_control_center/globals"
	"netease_control_center/interfaces/log"
)

var (
	seplaying bool = false
)

func SePlayerStateChange(se_state PlayerStatuses) {
	log.Println(log.DebugLog, "SEPlayer state: ", se_state)
	switch PlayerStatuses(se_state) {
	case SE_ST_PREPARING, SE_ST_PREPARED, SE_ST_PLAYING:
		seplaying = true
		TryMicAdcSet()
	case SE_ST_IDLE, SE_ST_COMPLETED:
		seplaying = false
		TryMicAdcIdle()
	}
}

func SeIsPlaying() bool {
	return seplaying
}
