Open
Description
audioData.timestamp
is immutable, by design. There is however no convenient way of creating a new AudioData object with a different timestamp. Currently, users have to copy out data (plane by plane) and pass in the same sampleRate
, numberofFrames
, numberOfChannels
parameters.
This issue tracks a proposal to add a new AudioData constructor, which mirrors VideoFrame's "copy constructor".
interface AudioData {
constructor(AudioData audioData, AudioDataCopyInit init)
[...]
}
AudioDataCopyInit {
required long long timestamp; // microseconds
}
The new constructor would copy all the data and metadata from the passed in audioData
, and replace the original timestamp with the one passed in the AudioDataCopyInit
.