I would recommend using ffmpeg. It seems better at reading from mkv and also has a more feature-complete eac3 decoder IIRC.
Code:
ffmpeg -i "x.mkv" -map 0:a:0 "x.wav"
It can correct delays, too. Hope this is correct:
Code:
ffmpeg -i "x.mkv" -map 0:a:0 -af aresample=first_pts=0 "x.wav"