Issue #16685: Added support for writing any bytes-like objects in the aifc,
sunau, and wave modules.
diff --git a/Lib/sunau.py b/Lib/sunau.py
index 1880a01..3c24492 100644
--- a/Lib/sunau.py
+++ b/Lib/sunau.py
@@ -415,6 +415,8 @@
         return self._nframeswritten
 
     def writeframesraw(self, data):
+        if not isinstance(data, (bytes, bytearray)):
+            data = memoryview(data).cast('B')
         self._ensure_header_written()
         if self._comptype == 'ULAW':
             import audioop