Comment 5 for bug 1497183

Revision history for this message
ChloƩ AVRILLON (chloe-avrillon) wrote : Re: Midi scripting : "duration" is an integer

hannnnnn.... I understood something reading the source code !!!!
The duration given is the duration given by the tags of the file , wich is an integer.

Soooo it's better to leave as it is.

But what is interesting and not dociumented is that we have a property available : "Channels", that provide us the info to know if our track is Stereo or not.

Therefore we can return a real value for the duration like that :
real_duration==track_samples/track_sample_rate/channels