1- The hadith says “bayt” which means room, not a house. So those hadiths apply to music being played in that room. If you are in a different room, Insha’Allah you won’t be affected
2- These hadiths mean that the Barakah/blessings in such a house will be less. The prayer is technically valid. So don’t worry about your prayer being invalid even if you are in the same room.