After having brought it down to the lowest common denominator, I found out that this seems to be a bug in IE when the IFrame where this is being played is not visible. If I run the same code by launching that URL as is, it works. But, the same code launched in an invisible IFrame will not work in IE.
In Firefox this works. So, this seems to be browser related.
When it works, it works in both mode, thus with Response.Write() or with Page.ClientScript.RegisterClientScriptBlock().
Would there be anyone who would have an idea of a workaround to have this working in IE in that condition? There could be something else. But, so far, the only thing I could see which seems to be a factor is the fact that this wav or mp3 file is being played within an invisible IFrame. As is in a page, which is the same URL, if I paste that URL manually in the browser, it works.