Closed ghost closed 6 years ago
Regarding whether to put the duration in ISoundProperties, it might make sense, but not a big deal. If you do put it there, then also change the header doc in ISoundProperties.
Also can you add it to the ags cheat sheet doc? https://github.com/tzachshabtay/MonoAGS/blob/master/Docs/articles/ags-cheat-sheet.md It's the equivalent to Channel -> LengthMs
Also check out the CodeFactor single issue (not critical though).
Done.
I think it was a mistake to add this property to ISoundProperties. ISoundProperties is used as an argument to AudioClip.Play, which means its intention is sound setup, rather than to tell information about it. If someone implements a class for the sole purpose of passing into Play function, they will now have to make it tell "duration".
Ah, right, I agree. Do you want to submit a fix for this?
Well, I don't know what's better solution. New interface?
Seems like overkill to add an interface for a single property, I think what you did at the beginning (duplicate the property for ISound and IAudioClip) is fine for now.
Added IAudioClip.Duration and ISound.Duration properties, telling total duration of the sound in seconds.
Notes: