Results 1 to 6 of 6

Thread: Is there an API which can record audio in Windows Phone 7

  1. #1
    Join Date
    Oct 2010
    Posts
    189

    Is there an API which can record audio in Windows Phone 7

    The Windows phone 7 is the new generation mobile phone which is the innovative gift from the Microsoft. It is the modern version of windows based on mobile OS. I know that the WP7 supports Application Programming Interface (API). I need to record voice or audio in my mobile. Is there any good API to perform this task? Also I want to know that is API can be accessed by the silverlight application?

  2. #2
    Join Date
    Feb 2010
    Posts
    644
    The WP7 features are unleashed very quickly. In order to record voice or audio files via Microphone you will need a application framework for your WP7. The framework which contains a microphone class is a Microsoft.Xna.Framework.Audio namespace. You can download it from MSDN library official website of Microsoft. If you stuck into any problems by using this you can get the help from XNA Audio Forum.Whereas the Silverlight application is not depends on XNA framework.

  3. #3
    Join Date
    Feb 2010
    Posts
    766
    You can record audio or speech data from microphone to WP7. There are several things to before recording because the WP7 does not support any third party API. You phone must contain silverlight3. But there is no direct support. We can use XNA libraries to support audio recording. Once you are finished with adding a reference to Microsoft.XNA. Framework you can begin audio recording by the use of microphone default class. (Note: the XNA Framework is not an event Driven)

  4. #4
    Join Date
    Feb 2010
    Posts
    701
    The good API is available from the silverlight. In the following code the BufferReady event fires.
    public EventDrivenCapture()
    {
    mic = Microphone.Default;
    mic.BufferDuration = TimeSpan.FromMilliseconds(100);
    bufferDuration = mic.BufferDuration;
    Buffer = new byte[mic.GetSampleSizeInBytes(mic.BufferDuration)];
    mic.BufferReady += new EventHandler(OnBufferReady);
    DynamicPlayback = new DynamicSoundEffectInstance(mic.SampleRate, AudioChannels.Mono);
    }

    public void OnBufferReady(object sender, EventArgs args)
    {
    mic.GetData(buffer, out duration);
    DynamicPlayback.SubmitBuffer(Buffer);
    }

  5. #5
    Join Date
    Feb 2010
    Posts
    796
    In order to capture the audio files from silverlight in WP7 you must impel the XNA dispatcher to fire the event only if you use EventDriven capture. The microphone class contains properties, methods and fields and events for capturing audio files. Check the Microsoft.xna.framework.dll for audio namespace.

  6. #6
    Join Date
    Feb 2010
    Posts
    658
    The silverlight is not a well API yet. There is a third party API which provides the feature for recording and playing audio data using call back function. It is an open-source, cross platform, audio I/O library. You can write code in c or c++ that will compile and run in several platforms. But the problem is that it is a third party API. I am not sure about that whether it will supports for WP7 platform or not.

Similar Threads

  1. Unable to record streaming audio to CD in windows 7
    By SURNAME in forum Operating Systems
    Replies: 3
    Last Post: 28-12-2010, 08:03 AM
  2. Can not record an audio on mac OS.
    By KAMAL60 in forum Operating Systems
    Replies: 7
    Last Post: 16-06-2010, 03:49 PM
  3. Cannot install Audio Record Wizard in Windows 7
    By michaels in forum Operating Systems
    Replies: 6
    Last Post: 06-04-2010, 01:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,260,619.67362 seconds with 17 queries