mirror of
https://git.femboyfinancial.jp/james/lipsync.git
synced 2024-11-25 03:52:02 -08:00
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
/*
|
|
* TempoTableEntry.cs
|
|
* Copyright (c) 2008-2009 kbinani
|
|
*
|
|
* This file is part of Boare.Lib.Vsq.
|
|
*
|
|
* Boare.Lib.Vsq is free software; you can redistribute it and/or
|
|
* modify it under the terms of the BSD License.
|
|
*
|
|
* Boare.Lib.Vsq is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Boare.Lib.Vsq {
|
|
|
|
[Serializable]
|
|
public class TempoTableEntry : IComparable<TempoTableEntry>, ICloneable {
|
|
public int Clock;
|
|
public int Tempo;
|
|
public double Time;
|
|
|
|
public object Clone() {
|
|
return new TempoTableEntry( Clock, Tempo, Time );
|
|
}
|
|
|
|
public TempoTableEntry( int clock, int _tempo, double _time ) {
|
|
this.Clock = clock;
|
|
this.Tempo = _tempo;
|
|
this.Time = _time;
|
|
}
|
|
|
|
public int CompareTo( TempoTableEntry entry ) {
|
|
return this.Clock - entry.Clock;
|
|
}
|
|
|
|
public bool Equals( TempoTableEntry entry ) {
|
|
if ( this.Clock == entry.Clock ) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|