First time here? Check out the FAQ!
x

Is there a way to get the sampleFileDuration of a sample written by the MemoryWriter?

0 votes
338 views
I've got an encapsulated Sound using the MemoryWriter and another encapsulated Sound reading from it. I do some CapyTalk based on the duration (set by CaptureDuration in the writing Sound) of the buffer the MemoryWriter writes. For now I solved that by adding a CaptureDuration parameter to the reading class as well which is working fine.

However I was wondering if I can use some SmallTalk to get the sampleFileDuration of the memory? I tried 'recording' sampleFileDuration but of course Kyma is trying to find a sample on disk. Is there a way to let the reading class know the CaptureDuration set in the writing class automatically?

Thanks!
asked Apr 23, 2016 in Capytalk & Smalltalk by kymaguy (Virtuoso) (10,580 points)
Since you know the CaptureDuration, you already know the duration of the sample written by the MemoryWriter. In other words, the way you're already doing it, is the best way to do it, because you're interested in the CaptureDuration, not the length of the actual reserved memory (which is typically longer than the CaptureDuration).
thought so... thanks more making things clear :)

Please log in or register to answer this question.

...