正在阅读:制作自动循环播放的MP3播放器(下)制作自动循环播放的MP3播放器(下)

2004-06-04 15:27 出处:CSDN 作者:happyparrot 责任编辑:linjixiong


              //

              m_CFile.ReadSetInfo(m_SetInfo);

              SYSTEMTIME sysTime;

              GetLocalTime(&sysTime);

              m_CFile.ReadDayInfo(sysTime.wDayOfWeek,m_Info);

              m_CFile.Close();

              int hour = GetHour(m_Info.sSStarttime);

              int minute = GetMinute(m_Info.sSStarttime);

              if(sysTime.wHour == hour && sysTime.wMinute == minute)//开始播放上午音乐

              {

                     ReadCatalogMusic(m_Info.sSMusic);//读取配置文件中指定的上午播放音乐目录

                     m_nPlay = 0;

                     Play(0);

                     KillTimer(1); //终止1号定时器

                     int duration = atoi(m_Info.sSDuration);//读取播放时间段

                     SetTimer(3,duration*60*1000,NULL);//启动三号定时器

                     m_nFlag = 1;

                     return;

              }

              hour = GetHour(m_Info.sMStarttime);

              minute = GetMinute(m_Info.sMStarttime);

              if(sysTime.wHour == hour && sysTime.wMinute == minute)//开始播放中午音乐

              {

                     ReadCatalogMusic(m_Info.sMMusic);

                     m_nPlay = 0;

                     Play(0);

                     KillTimer(1);

                     int duration = atoi(m_Info.sMDuration);

                     SetTimer(3,duration*60*1000,NULL);

                     m_nFlag = 2;







察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品