Skip to content

No convenient way of rebasing AudioData timestamp #505

Open
@tguilbert-google

Description

@tguilbert-google

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionInterface changes that extend without breaking.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions