This project has moved. For the latest updates, please go here.

NAudio issues in web environment?

Jun 1, 2010 at 6:07 PM
Edited Jun 1, 2010 at 6:43 PM

Hi.


Using NAudio for a hearing test.  Set the amp, freq and play. (for WaveOut) Works fine on a windows form environment... however... called from my asp.net MVC app the sound only lasts as long as the DesiredLatency value. Can't maintain a tone. (just get beeps, essentially)

 

Anybody run into this -- come up with any fixes? (I'm going to dig in more, thought it would be nice if there was already a fix out that someone knew of)

 

 

Coordinator
Jun 2, 2010 at 8:17 AM

I'm not sure I understand how you're trying to use NAudio with MVC. Is the web server playing audio? What callback method are you using for WaveOut? It should be function callbacks.

Mark

Jun 2, 2010 at 4:34 PM
markheath wrote:

I'm not sure I understand how you're trying to use NAudio with MVC. Is the web server playing audio? What callback method are you using for WaveOut? It should be function callbacks.

Mark

 Sorry for not being more specific. I run a local web server for the MVC app... this app is then launched inside a WebBrowser control on a windows form. It is from server side calls of waveout -- via ajax -- that I have issues.  (for testing purposes, I tried playing it from the containing form and it worked as desired -- I need to be able to call it from the web app, though)

Ahh, seem to be using window instead of function for callbacks. Thanks for that tipoff. Will try to make appropriate changes now.