Skip to content

Implementation as a transform stream #30

@albertojorge1983

Description

@albertojorge1983

It would be safe to asume that this would work?
Because I'm getting weird result on my end.

var codecParserTransform = new Transform({
  transform: function (chunk, encoding, cb) {
    for (const frame of this.codecParser.parseChunk(chunk)) {
      this.push(frame.data)
    }

    cb()
  }
})

someReadableAudio.pipe(codecParserTransform).on('data', (frame) => { 
 someWritableStream.write(frame)
})

Or there is a better way of doing this??
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions