Skip to content

Commit bb40b5c

Browse files
committed
Correction
1 parent 129c5de commit bb40b5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shared-bindings/audiocore/WaveFile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
//| be 8 bit unsigned or 16 bit signed. If a buffer is provided, it will be used instead of allocating
4141
//| an internal buffer, which can prevent memory fragmentation."""
4242
//|
43-
//| def __init__(self, file: Union(typing.BinaryIO, str), buffer: WriteableBuffer) -> None:
43+
//| def __init__(self, file: Union[str, typing.BinaryIO], buffer: WriteableBuffer) -> None:
4444
//| """Load a .wav file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`.
4545
//|
46-
//| :param Union(typing.BinaryIO, str) file: The name of a wave file (preferred) or an already opened wave file
46+
//| :param Union[str, typing.BinaryIO] file: The name of a wave file (preferred) or an already opened wave file
4747
//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer,
4848
//| that will be split in half and used for double-buffering of the data.
4949
//| The buffer must be 8 to 1024 bytes long.

shared-bindings/audiomp3/MP3Decoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
//| https://learn.adafruit.com/Memory-saving-tips-for-CircuitPython/reducing-memory-fragmentation
4545
//| """
4646
//|
47-
//| def __init__(self, file: Union(typing.BinaryIO, str), buffer: WriteableBuffer) -> None:
47+
//| def __init__(self, file: Union[str, typing.BinaryIO], buffer: WriteableBuffer) -> None:
4848
//|
4949
//| """Load a .mp3 file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`.
5050
//|
51-
//| :param Union(typing.BinaryIO, str) file: The name of a mp3 file (preferred) or an already opened mp3 file
51+
//| :param Union[str, typing.BinaryIO] file: The name of a mp3 file (preferred) or an already opened mp3 file
5252
//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file.
5353
//|
5454
//| Playback of mp3 audio is CPU intensive, and the

0 commit comments

Comments
 (0)