Constructors
constructor
- new SampleUnit(sample, sampleRate): SampleUnit
Parameters
- sample: number
- sampleRate: number
Accessors
sampleRate
- get sampleRate(): number
Returns number
- set sampleRate(value): void
Returns void
samples
- get samples(): number
Returns number
seconds
- get seconds(): number
Returns number
unix
- get unix(): number
Returns number
- set unix(value): void
Returns void
Methods
equals
- equals(sample): boolean
Returns boolean
hasEqualSampleRate
- hasEqualSampleRate(sample2): boolean
Returns boolean
toString
- toString(): string
Returns string
Static
calculateSamples
- calculateSamples(seconds, sampleRate): number
Parameters
- seconds: number
- sampleRate: number
Returns number
Static
fromMiliSeconds
- fromMiliSeconds(miliseconds, sampleRate): SampleUnit
Parameters
- miliseconds: number
- sampleRate: number
Static
fromSeconds
- fromSeconds(seconds, sampleRate): SampleUnit
Parameters
- seconds: number
- sampleRate: number