Sound files, is there a way to stop the play before the end of the file or loop a file to play multiple times

I am working on a football module and want to play some background crowd noise at low level but see no way to loop a smaller file or stop a file once it has started playing.

Looping a set number of times could be done using a Trigger trait but I think you may run up against one of two sound issues if .wav or .mp3 files are involved (logged here). I think the ideal that you are asking for is something that would have to be done in a custom class (java). Maybe someone out there has already done one.