0

I have been developing the code which records the audio in the client side. Well, I enclosed the code for recording , which is working fine in Visual studio under project development but not working in website app development in visual studio

// for recording ( _)

 mciSendString("open new Type waveaudio Alias recsound", Nothing, 0, 0)
 mciSendString("record recsound", Nothing, 0, 0) 

// for storing

mciSendString("save recsound c:\record.wav", "", 0, 0)
mciSendString("close recsound", "", 0, 0)

It doesn't work, can any one say wats wrong in this code PS: I read some of the threads related to this question in stackoverflow but it doesn't help me much

  • Please **edit your question** to answer the following queries: Question 1: What symptoms do you have? An empty file? An exception? An audio file but you can't hear any audio? Question 2: What is the source of your audio - I can't understand what you would be trying to record server-side, so please can you explain what you are attempting to achieve? – RB. Feb 17 '14 at 11:26
  • 1. No exception at all (works fine without recording) , 2.sry for the mistake its client side (source - user voice) – user3282816 Feb 17 '14 at 13:07
  • Ok, so the voice source is client-side, but you are recording it server-side. How are you getting it *from* the client side, *to* the server side? Are they uploading a file, or are they somehow streaming their audio to you, or something else? – RB. Feb 17 '14 at 13:22
  • My thoughts - whenever the client click the record button , event automatically calls the server side function to record (so there is no need for uploading/sending ) and then i stored in the database. – user3282816 Feb 17 '14 at 13:32

1 Answers1

0

Unfortunately this won't work. Calling mciSendString on the server will not affect the client at all. You can't call Windows API commands from the server to the client. Read this to see how it's possible with technologies like HTML5 (it's not easy at all):

http://www.html5rocks.com/en/tutorials/getusermedia/intro/ Recording html5 audio

I feel your best bet is via a Flash applet.

Voice recording applet/flash in a webbrowser

Community
  • 1
  • 1
Tom
  • 3,354
  • 1
  • 22
  • 25