我有兴趣在曲目之间插入2秒的暂停。这个link解释了在两个轨道之间插入一定长度的暂停的过程,但是我不清楚我应该修改或添加到代码中。我在记事本中打开了播放列表(.xspf扩展名),如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
<title>Playlist</title>
<trackList>
<track>
<location>file:///C:/Folder1/File_3.mp3</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>0</vlc:id>
</extension>
</track>
<track>
<location>file:///C:/Folder1/File_1.mp3</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>1</vlc:id>
</extension>
</track>
<track>
<location>file:///C:/Folder1/File_2.mp3</location>
<duration>576</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>2</vlc:id>
</extension>
</track>
</trackList>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:item tid="0"/>
<vlc:item tid="1"/>
<vlc:item tid="2"/>
</extension>
</playlist>
有人可以解释我该怎么办?
答案 0 :(得分:0)
代码:
<track>
<location>vlc://pause:2</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>ID</vlc:id>
</extension>
</track>
插入需要暂停的<track> <\track>
和要顺序更新的变量ID之间;在列表底部,<vlc:item tid="ids"/>
列表必须相应更改。
以下代码将在 File_3 和 File_1 之后插入两秒钟暂停。
<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
<title>Playlist</title>
<trackList>
<track>
<location>file:///C:/Folder1/File_3.mp3</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>0</vlc:id>
</extension>
</track>
<track>
<location>vlc://pause:2</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>1</vlc:id>
</extension>
</track>
<track>
<location>file:///C:/Folder1/File_1.mp3</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>2</vlc:id>
</extension>
</track>
<track>
<location>vlc://pause:2</location>
<duration>792</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>3</vlc:id>
</extension>
</track>
<track>
<location>file:///C:/Folder1/File_2.mp3</location>
<duration>576</duration>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>4</vlc:id>
</extension>
</track>
</trackList>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:item tid="0"/>
<vlc:item tid="1"/>
<vlc:item tid="2"/>
<vlc:item tid="3"/>
<vlc:item tid="4"/>
</extension>
</playlist>