I ran this code in 2019 to give my students a simple Fourier filtering exercise. It generates some multi-tone sound data, then plays the tone (allowing the user to pause the playing, since the tone gets annoying). Then we filter out the higher or lower tone and listen to the difference. I've posted below only the data generation and sound playing code. But now, four years later, the module won't pause when you toggle the play/pause icon. I haven't changed the code, so is this a version update problem?
tData = Table[i 0.00012, {i, 0, 1023}];
yData = Table[
0.1 Sin[2 Pi 440 i 0.00012] + Sin[2 Pi 1400 i 0.00012], {i, 0,
1023}];
sound = ListPlay[yData, SampleRate -> 8333];
DynamicModule[{state = "pause"},
Grid[{{Toggler[
Dynamic@state, {"pause" -> Style["\[RightPointer]", 24],
"play" -> Style["\[FilledSmallSquare]", 16]}],
Dynamic@If[state == "play",
If[ScheduledTasks[] == {}, RunScheduledTask[EmitSound[sound]]];
"playing",
If[ScheduledTasks[] != {},
RemoveScheduledTask[ScheduledTasks[]]]; "paused"]}}]]