var is_sound_played = 0;
function play_sound_1(){
if (is_sound_played === 2) return;
is_sound_played = 1;
var audio1 = new Audio ('audio/1.mp3');
audio1.autoplay = true;
setTimeout(function(){
is_sound_played = 0;
},3000);
}
function play_sound_2(){
if (is_sound_played === 1) return;
is_sound_played = 2;
var audio2 = new Audio ('audio/2.mp3');
audio2.autoplay = true;
setTimeout(function(){
is_sound_played = 0;
},3000);
}
<a href="#" onClick="bck()"><img src="foto/left.png" width="50" ></a>
<a href="#" onClick="frw()"><img src="foto/right.png" width="50" ></a>