The game's actual soundtrack can be found in raw format in something like \Dominions4\data\rawsound
The files that are larger than 100 kilobytes are all soundtrack stuff (others in the folder are sfx). They are mostly .al files but a few are encoded as .sw files. The files ending in .al are A-Law Little Endian 22050 Hz Mono data. The files ending in .sw are signed 16-bit PCM Little Endian 22050 Hz Mono data.
You can download Audacity and use it to import the raw data (File -> Import -> Raw Data) and export your choice of .mp3, .flac, or whatever (File -> Export) for your specific music player of choice.
More specifically,
The game's actual soundtrack can be found in raw format in something like \Dominions4\data\rawsound
The files that are larger than 100 kilobytes are all soundtrack stuff (others in the folder are sfx). They are mostly .al files but a few are encoded as .sw files. The files ending in .al are A-Law Little Endian 22050 Hz Mono data. The files ending in .sw are signed 16-bit PCM Little Endian 22050 Hz Mono data.
You can download Audacity and use it to import the raw data (File -> Import -> Raw Data) and export your choice of .mp3, .flac, or whatever (File -> Export) for your specific music player of choice.