求 とある一家の某个家族的御茶会议议 的lrc文件

某一家的御茶会议|LOFTER(乐乎) - 记录生活,发现同好
LOFTER for ipad —— 记录生活,发现同好
下载移动端
关注最新消息
&nbsp&nbsp被喜欢
&nbsp&nbsp被喜欢
{list posts as post}
{if post.type==1 || post.type == 5}
{if !!post.title}${post.title|escape}{/if}
{if !!post.digest}${post.digest}{/if}
{if post.type==2}
{if post.type == 3}
{if !!post.image}
{if post.type == 4}
{if !!post.image}
{if !!photo.labels && photo.labels.length>0}
{var wrapwidth = photo.ow < 500?photo.ow:500}
{list photo.labels as labs}
{var lbtxtwidth = Math.floor(wrapwidth*(labs.ort==1?labs.x:(100-labs.x))/100)-62}
{if lbtxtwidth>12}
{if !!labs.icon}
{list photos as photo}
{if photo_index==0}{break}{/if}
品牌${make||'-'}
型号${model||'-'}
焦距${focalLength||'-'}
光圈${apertureValue||'-'}
快门速度${exposureTime||'-'}
ISO${isoSpeedRatings||'-'}
曝光补偿${exposureBiasValue||'-'}
镜头${lens||'-'}
{if data.msgRank == 1}{/if}
{if data.askSetting == 1}{/if}
{if defined('posts')&&posts.length>0}
{list posts as post}
{if post_index < 3}
{if post.type == 1 || post.type == 5}
{if !!post.title}${post.title|escape}{/if}
{if !!post.digest}${post.digest}{/if}
{if post.type == 2}
{if post.type == 3}
{if post.type == 4}
{if post.type == 6}
{if drlist.length>0}
更多相似达人:
{list drlist as dr}{if drlist.length === 3 && dr_index === 0}、{/if}{if drlist.length === 3 && dr_index === 1}、{/if}{if drlist.length === 2 && dr_index === 0}、{/if}{/list}
暂无相似达人,
{if defined('posts')&&posts.length>0}
{list posts as post}
{if post.type == 2}
{if post.type == 3}
{if post.type == 4}
{if post.type == 6}
this.p={ currentPage:1,pageNewMode:true,isgooglead3:false,ishotrecompost:false,visitorId:0, first:'',tag:'某一家的御茶会议',recommType:'new',recommenderRole:0,offset:1,type:0,isUserEditor:0,};你确定吗 - 网易云音乐
可以听的歌算是
播放:359次
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:まいいか - 网易云音乐
喵喵喵(?o . o?)
播放:118次
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:V家英填词|LOFTER(乐乎) - 记录生活,发现同好
LOFTER for ipad —— 记录生活,发现同好
记录生活,发现同好
51位喜爱 #V家英填词 的小伙伴邀你来玩
查看高清大图
喜欢并收藏内容
关注达人获取动态
评论私信与同好交流
10秒注册,查看更多优质内容
网易公司版权所有 & ICP备:浙B2-增值电信业务经营许可证:浙B2-
{if x.type==1}
{if !!x.title}${x.title}{/if}
{if !!x.digest}${x.digest}{/if}
{if x.type==2}
{if x.type==3}
{if x.type==4}
加入 LOFTER 开通功能特权
查看高清大图
喜欢并收藏内容
关注达人获取动态
评论私信与同好交流LRC文件如上图所示。
&#26684;式为 [mm:ss.ms]歌词
但是也有单行多个时间轴的情况,即 [mm:ss.ms][mm:ss.ms]歌词
对于解析来说,比较困难的正是单行多个时间轴的情况。我的解决方法是:
对单独一行检索]后没有[的位置,即该行最后一个[]框,将指针指向下一元素,就是这行歌词的第一个字。编写函数将最后一个[]里面mm:ss.ms&#26684;式的时间轴化为long的ms。删除最后一个[]及里面的内容,将后面的歌词并上来重新构成该行(整个算法的亮点就在这里)重新检索该行最右边的[],直到没有[]为止开始检索下一行,重复(1)的操作,直到下一行也没有[]为止。整个歌词用链表储存,获取所有时间轴和歌词之后,按时间轴对链表进行排序。
我还只是初学者,代码可能不太规范,请见谅。
.lrc Analysis
Copyright (c) 2016 Equim.
All rights reserved.
#include&stdio.h&
#include&stdlib.h&
#include&string.h&
#include&time.h&
#include&windows.h&
#include&mmsystem.h&
#pragma comment(lib, &WINMM.LIB&)
#define LEN sizeof(lyric)
typedef struct _lyric
long timeL
char verse[256];
struct _lyric*
lyric* Head=NULL;
long ms(char origin[9])
//将mm:ss.ms化为毫秒
long result=0;
result=atoi(origin)*60*1000+atoi(origin+3)*1000+atoi(origin+6)*10;
void OutputLyrics()
for(p=Hp!=NULL;p=p-&next)
printf(&%ld && %s\n&,p-&timeLine,p-&verse);
void Play()
clock_t e,
system(&mode con cols=150 lines=3&);
mciSendString(&play D:\\C\\Jukebox\\Release\\audio\\ebbandflow.mp3&,NULL, 0, 0);
mciSendString(&setaudio D:\\C\\Jukebox\\Release\\audio\\ebbandflow.mp3 volume to 150&,NULL, 0, 0);
start=clock();
Sleep(200);
e=clock()-
printf(&%ld\t&,e);
while(!(p-&next==NULL||(p-&next)-&timeLine&=e))
//检索当前应显示的歌词,要么是最后一句,要么下一句的时间轴在当前时间之后
printf(&%ld && %-130.130s\r&,p-&timeLine,p-&verse);
int main()
FILE *lrc=fopen(&D:\\C\\Jukebox\\Release\\audio\\ebbandflow.lrc&,&r&);
char linePointer[256];
lyric *p,*q,temp,*tempM
让linePointer指向第一个歌词串
fgets(linePointer,256,lrc);
while(!(linePointer[2]&=&#39;0&#39;&&linePointer[2]&=&#39;9&#39;));
对每一行歌词进行操作
if(linePointer[strlen(linePointer)-1]==&#39;\n&#39;)
linePointer[strlen(linePointer)-1]=&#39;\0&#39;;
//删除末尾的回车
}while(!(linePointer[i-1]==&#39;]&#39;&&linePointer[i]!=&#39;[&#39;));
//让i指向最右边的[]右侧]的右边,即指向该行歌词的第一个字
p=(lyric*)malloc(LEN);
p-&timeLine=ms(linePointer+i-9);
strcpy(p-&verse,linePointer+i);
if(Head==NULL)
q-&next=p;
linePointer[i-10]=&#39;\0&#39;;
//删除最后的括号
strcat(linePointer,q-&verse);
//巧妙地接回去便于继续解析
}while(linePointer[0]==&#39;[&#39;);
//解析到没有括号为止
}while(!(fgets(linePointer,256,lrc)==NULL||linePointer[0]!=&#39;[&#39;));
//到最后一行
q-&next=NULL;
fclose(lrc);
按时间轴排序
for(p=Hp!=NULL;p=p-&next)
//比较笨拙的选择排序,按时间轴从小到大
tempMin=p;
for(q=p-&q!=NULL;q=q-&next)
if(tempMin-&timeLine&q-&timeLine)
//找最小的
tempMin=q;
//寻找比最小还要小的,用临时指针标记
if(tempMin!=p)
//如果确实找到了更小的
temp=*tempM
*tempMin=*p;
temp.next=tempMin-&
tempMin-&next=p-&
p-&next=temp.
播放测试或打印到屏幕 */
// OutputLyrics();
在我这边的环境下目前仅支持ANSI编码的lrc文件(Unicode和UTF-8会变乱码)
同步播放的效果
按条导出的效果
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:786次
排名:千里之外

我要回帖

更多关于 某个家族的御茶会议 的文章

 

随机推荐