Skip to content

return_pin for audio.play() throws an error by design, but should ignore it #181

@microbit-carlos

Description

@microbit-carlos

For out-of-the-box compatibility with V1 code the V2 implementation of audio.play(return_pin=...) should ignore the value instead of throwing an error:

>>> audio.play(audio.AudioFrame(), return_pin=pin2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: return_pin not supported
>>> 

This is also what we've documented in https://microbit-micropython.readthedocs.io/en/v2-docs/audio.html#audio.play .

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions