access to input data from microphone in WP7? - windows-phone-7

How can I access to input data from microphone in Windows Phone 7.0 or 7.1? (like a Volume Meter), i want to detect start and end input data from microphone.

Have a look at How to: Access the Microphone in a Silverlight Application for Windows Phone for basic usage.
If you want to detect the start and stop of certain audio input you'll have to parse/process the returned stream yourself.

This blog post also has a great tutorial (and code) showing how you access the microphone in WP7 via XNA: http://blogs.msdn.com/b/mikeormond/archive/2010/08/27/xna-from-silverlight-on-windows-phone-7-the-microphone.aspx
Good luck!

Related

Recording Audio Stream in Background in Windows phone 7/8

I m developing an app which can record audio stream.
I want to know that is it possible to record that audio in background, i,e when the application is in deactivated mode?
I have already tried to do that in many different ways,but its not helping out.
Please suggest me some way to do such...
Thank you.
As mentioned in the comments, it's not possible to record in the background.
Your app must be running in the foreground for it to be able to record audio using the microphone. For an overview of all the audio recording options, please refer to this tutorial on the Nokia Developer Wiki.
Also, an app will not run when the phone is locked - it is suspended. So if your app was recording, it would stop when the phone is locked. You can change this behaviour with IdleDetectionMode.Disabled which means your app keeps running even though the phone is locked.
Haven't implemented it before, but classifying it as a VOIP app could be the way to go:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207046(v=vs.105).aspx

Record audio in background

I'm wondering if anyone has any idea that capture audio from the device's microphone on the new Windows Phone 7 in background (Silverlight, not XNA)
or any code to do it?
Even in a Silverlight application, the Microphone is accessed via libraries in the Microsoft.Xna.* namespaces.
The use of such namespaces is not supported in a Background Task. See http://msdn.microsoft.com/en-us/library/hh202962(v=vs.92)
This is not possible and would break the security principle of not allowing apps to do something that the user isn't aware of.

Accessing the output audio buffer on Windows Phone 7

The MediaPlayer.GetVisualizationData method does not work for Windows Phone 7, so I'm trying to find another way to visualize music playing through the MediaPlayer.
The post Extracting sound spectrum data in WP7 gives a method for doing beat detection given an audio buffer, but it doesn't explain how to get this buffer on the phone.
How can I access audio samples/frequency data from the music MediaPlayer is playing? I'm not trying to access a buffer from the microphone - I need access to the output audio on the device.
See my answer to this other SO question:
Extracting sound spectrum data in WP7
"Visualization data is not available
on Windows Phone. Any attempt to get
visualization data on the phone will
populate the VisualizationData class
with 0s."

Sound effects with windows phone 7

I'd like to try creating some sound effects with the windows phone 7. I found a sample from microsoft that shows how to get the input from the microphone.
Microphone Input Sample
I don't know anything about sound manipulation through code - are there any example for changing the pitch, tone, etc of the microphone input?
Take a look at Microsoft.Xna.Framework.Audio.SoundEffect. It has the ability to alter pitch and pan when playing a sound.
You could also try experimenting with the DopplerScale and DistanceScale.

Recording audio on Mac

I am developing an application which access my audio input device and record audio from my microphone.
Here when i am pressing START button it have to record audio from microphone and have to stop recording when pressing STOP button.
My device is Lynx-AES16 and i got driver from there site.
In windows i am accessing the machine(Lynx) by using direct-show SDK(Graph edit). 
Is there any similar tool  like direct-show is available. I checked with AUAudio and IOkit but didnt understood that much.
Can anyone provide some sample or some useful links. Apple link is not good for a starter 
Look at the CoreAudio sample code at developer.apple.com. There is plenty of useful code there.
In particular look at the RecordAudioToFile example.

Resources