WaveBeans / wavebeans

Audio Processing. On scale.
https://wavebeans.io
Apache License 2.0
24 stars 0 forks source link

SampleCountMeasurement improvement #52

Closed asubb closed 4 years ago

asubb commented 4 years ago

Right now to register a new sample type you need to do something like this:

SampleCountMeasurement.registerType(S::class) { 1 }

For most cases it is used along with the serialization. Would be nice to provide measurement implementation as function of the class:

@Serializable
data class S(val v: Long) : Measured {
  override fun measure(): Int {
     // implementation here
  }
}
asubb commented 4 years ago

Improved in #54