What's the difference meaning between these two sentences


Alberto oyo la musical de la fiesta y Salio de casa.

Alberto oia la musical de la fiesta cuando Salio de casa.

1 answer

The first sentence suggests that Alberto heard the music and then left the house, while the second sentence implies that Alberto was already hearing the music when he left the house.