audiojs / audio

Class for high-level audio manipulations [NOT MAINTAINED]
MIT License
240 stars 9 forks source link

`unit` property #43

Open dy opened 6 years ago

dy commented 6 years ago

Possible cases

// string in options
audio.shift(100, 'ms')

// string args
audio.pad('2s')

// options param
audio.pad(2, {unit: 's'})

// predefine unit (bad, since different instances have different behavior)
audio = Audio(2, 's')
audio.pad(2)

Would that be demanded? Would that be better than audio.pad(audio.time(2))?