本文整理汇总了C#中com.getSecFromClock方法的典型用法代码示例。如果您正苦于以下问题:C# com.getSecFromClock方法的具体用法?C# com.getSecFromClock怎么用?C# com.getSecFromClock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com
的用法示例。
在下文中一共展示了com.getSecFromClock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Edit
public static bool Edit( com.github.cadencii.vsq.VsqFile Vsq ) {
System.IO.StreamWriter sw = null;
try {
sw = new System.IO.StreamWriter( @"c:\lyrics.txt" );
for ( int i = 0; i < Vsq.Track.get( 1 ).getEventCount(); i++ ) {
com.github.cadencii.vsq.VsqEvent item = Vsq.Track.get( 1 ).getEvent( i );
if ( item.ID.type == com.github.cadencii.vsq.VsqIDType.Anote ) {
int clStart = item.Clock;
int clEnd = clStart + item.ID.Length;
double secStart = Vsq.getSecFromClock( clStart );
double secEnd = Vsq.getSecFromClock( clEnd );
sw.WriteLine( secStart + "\t" + secEnd + "\t" + item.ID.LyricHandle.L0.Phrase + "\t" + item.ID.LyricHandle.L0.getPhoneticSymbol() );
}
}
} catch {
return false;
} finally {
if ( sw != null ) {
sw.Close();
}
}
return true;
}
示例2: Edit
public static bool Edit( com.github.cadencii.vsq.VsqFile Vsq ) {
System.IO.StreamWriter sw = null;
try {
sw = new System.IO.StreamWriter( @"c:\lyrics.txt" );
for ( Iterator<VsqEvent> itr = Vsq.Track.get( 1 ).getNoteEventIterator(); itr.hasNext(); ) {
com.github.cadencii.vsq.VsqEvent item = itr.next();
int clStart = item.Clock;
int clEnd = clStart + item.ID.Length;
double secStart = Vsq.getSecFromClock( clStart );
double secEnd = Vsq.getSecFromClock( clEnd );
sw.WriteLine( secStart + "\t" + secEnd + "\t" + item.ID.LyricHandle.L0.Phrase + "\t" + item.ID.LyricHandle.L0.PhoneticSymbol );
}
} catch {
return false;
} finally {
if ( sw != null ) {
sw.Close();
}
}
return true;
}