Is your audio working with music ? If so, running the DirectX Web Installer will install any 'missing' DX files (XAudio2_7.dll).
However, if the file has been corrupted you can repair the file one of two ways...
Reinstall DirectX using the DirectX Redist (June 2010) or...
locate the file in System32 and sysWOW64 and delete them. Then run the DirectX Web installer and it will replace the now missing file.
Download DirectX End-User Runtime Web Installer from Official Microsoft Download Center
Download Details - Microsoft Download Center - DirectX Redist (June 2010)
(Note that you first unpack the files to a location of your choice (a new folder on the desktop is good as you delete the folder
after the next step)... Open the folder and run the DXSETUP.exe to finalise the reinstall of DX.)
- If you have no audio try reinstalling your audio drivers. If using a laptop or OEM machine (DELL, etc) download the driver from
the mfg of the machine.
If using a 'custom' built machine download the drivers from the mfg of the motherboard.
- If you get an error message when trying to update or reinstall DirectX there is possibility of a corrupted .NET Framwork, or
you may need to Update Windows.
- Repair .NET .
https://docs.microsoft.com/en-us/dotnet/framework/install/repair
.