Selective autoplay of audio for certain notes

I’ve taken a look at Anki’s source code and it seems like a simple modification of the “play_clicked_audio” method in the “sound.py” script to accept lists as the last argument alongside plain integers should achieve several sought for pieces of functionality for card scripts:

  1. stopping audio playback (by calling the ‘play’ pycmd with empty list)
  2. filtering out some of the audio files from the autoplay (including with an HTML tag as in your suggestion)
  3. repeating each audio a certain number of times (or looping of them together)

I’m not sure if such changes to the core codebase are welcome, however. Maybe you know more about that?