Click here to get back home

Problem with recording voice

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problem with recording voice =?iso-8859-2?B?UmFmYbMgWmnqYmE 08-04-2008
Get Chitika Premium
Posted by =?iso-8859-2?B?UmFmYbMgWmnqYmE on August 4, 2008, 5:58 am
Please log in for more thread options
I'm developing managed application that envolves voice recording. I'm faced
with a strange problem. I'm PInvoking native functions and do as fallow

waveInOpen() (callback is a function)
waveInPrepareHeader()
waveInAddBuffer()

As soon as I receive calback with data I'm trying to call
waveInUnprepareHeader() (in seperate thread to avoid deadlock) but I'm
unsuccessful. I did some debugging and found out that Inqueue flag is stiil
set on the header and RecorderBytes field of the header struct is set to 0.
Data buffer is filled with recorded data and I can override the Inqueue flag
and unset it before calling waveInUnprepareHeader(). Everything works fine
then (except RecordedBytes value which is still set to 0). But it's just a
workaround.

--

Rafal


Posted by =?iso-8859-2?B?UmFmYbMgWmnqYmE on August 4, 2008, 5:41 pm
Please log in for more thread options
I've finally solved the problem. I've been passing pointer to instance of
WaveHdr class or struct (depends on what I've been trying) when I finally
realized that there is no guarantee that it won't change. I've allocated
some native memory and everything is working fine now. Microsofts sample
works only by pure chance and it took me only three days to realize it :)

--

Rafal


Similar ThreadsPosted
Emulator Recording Audio July 29, 2005, 6:26 am
Playing and recording AMR sound September 6, 2005, 9:26 pm
recording a video call September 12, 2005, 3:14 am
Recording a phone call April 10, 2006, 12:30 pm
DirectShow Video Recording December 29, 2006, 4:53 pm
Call Recording on pocketpc February 3, 2008, 4:19 am
Wave Recording in Mu-Law Format in Smartphone February 7, 2006, 12:53 am
Recording conference conversation using TAPI November 14, 2006, 12:59 am
Need wave file recording example for Mobile 6 and C# January 17, 2008, 7:04 pm
incoming/outgoing call recording September 23, 2008, 5:06 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap