Re: VOIP Softphone
- From: "Dave" <KingOfTheBeach@xxxxxxxxxxxxxxxx>
- Date: Mon, 27 Nov 2006 15:37:47 -0600
The application receives a data stream off the network. The packets are
spaced out every 50 milliseconds which equates to 800 bytes of audio data.
I gave you incorrect information in my previous email (i said 20 mils). So
if there is any jitter on the network at all I have to handle the conditions
in my application by either dropping packets if they are to late, playing
silence, or replaying a previous packet. My problems are really with
perfect data and perfect conditions. I'm sending data to waveOut at nearly
perfect 50 millisecond intervals.
Out of desperation I implemented a DirectSound test sample streaming the
1000hz tone in a similar fashion to how I handle sound in the softphone
application. It resulted in the same motor boat kind of sound.
I've tested a large number of these USB audio devices that are designed
primarily for VOIP applications and these 2 (a Polycom and a cyber
acoustics) I just can't seem to get to work like all the others.
Do I need to provide more or better details? Maybe some code samples?
<news@xxxxxxxxxxxxxxx> wrote in message
news:1164274784.526042.126430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dave wrote:data
I think you mean that if my waveOut
sample rate is 800 bytes of data every 20 milliseconds that my input
rate has to equal that? Is that what you mean?
Yep, if you're playing out a file from disc or generating the audio
data from scratch then it's easy to ensure the data is made available
at exactly the rate required by the waveOut device. However if you're
receiving the data from a remote source, not under your control, at a
rate which is nominally (but not precisely) the same as your waveOut
device then you may need to incorporate a strategy to deal with the
difference. For example this might involve dropping or duplicating
samples (perhaps during periods of 'silence') or using some kind of
interpolation. Whether this is a problem in practice will depend on
the tolerances of the two frequencies and the duration of the stream.
I'm running out of ideas to explain your problem. I do think that
polling the WHDR_DONE bits in a worker thread, without any callback, is
potentially wasteful of CPU time. You might be better to use a
CALLBACK_EVENT, then you can set the thread to a high priority (to
ensure a timely response) but most of the time it will be waiting in
WaitForSingleObject. You still need to poll the headers, but only when
the event tells you it is worthwhile.
Richard.
http://www.rtrussell.co.uk/
To reply by email change 'news' to my forename.
.
- References:
- VOIP Softphone
- From: Dave
- Re: VOIP Softphone
- From: news@xxxxxxxxxxxxxxx
- Re: VOIP Softphone
- From: Dave
- Re: VOIP Softphone
- From: news@xxxxxxxxxxxxxxx
- Re: VOIP Softphone
- From: Dave
- Re: VOIP Softphone
- From: news@xxxxxxxxxxxxxxx
- VOIP Softphone
- Prev by Date: TTS: how to include pause in the speech?
- Next by Date: Re: Windows Media Player 11 SDK
- Previous by thread: Re: VOIP Softphone
- Next by thread: Synchronize and PushSource filter
- Index(es):
Relevant Pages
|