MT#7421 API soundfiles, check empty filename

(cherry picked from commit 75aeaa6add03b15d35109984cf482ef53b0ad3ba)