mediadevices icon indicating copy to clipboard operation
mediadevices copied to clipboard

Convert underlying wave buffer to be uint8

Open lherman-cs opened this issue 4 years ago • 1 comments

This follows image package from the standard library. By having a homogenous data type for storing the samples, it makes easier to manipulate the raw data in a generic way.

The main motivation of doing this is so that we can have ChunkBuffer similar to what we have for images, https://github.com/pion/mediadevices/pull/209. If we had different data types to store the samples, we need to have multiple slices with different data types or we need to use unsafe to remove the type safety (which is not recommended generally).

This approach is inspired by https://golang.org/src/image/image.go?s=12897:12943#L428.

lherman-cs avatar Sep 07 '20 05:09 lherman-cs

@lherman-cs do you still want to get this in?

edaniels avatar Mar 03 '23 15:03 edaniels