Re: VOIP Softphone

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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:
I think you mean that if my waveOut
sample rate is 800 bytes of data every 20 milliseconds that my input
data
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.



.



Relevant Pages

  • iwi(4): firmware error OR panic: iwi firmware not idle, state ASSOCIATING
    ... iwi0: firmware error ... messages until I take the interface down ("ifconfig iwi0 down"). ... data packets ... www httpd 2501 4* internet stream tcp c8c4a000 ...
    (freebsd-current)
  • Re: Digital reception problems just on BBC in Brighton
    ... Found 1 video stream. ... Found 1 MPEG audio stream. ... Closing starting GOP. ... Video stream 1 now starts at 00:00:01.188 ...
    (uk.tech.digital-tv)
  • Re: Creating a speaking tapi application
    ... Now I want to play that audio with speaker instead of recording. ... It is called terminals because when we talk about video streams ... earlier date that perhaps I could monitor the incoming stream and attempt ... CComPtr pEnumAddress; ...
    (microsoft.public.win32.programmer.tapi)
  • Tips for recording audio streams
    ... recording streaming audio from the Internet on a Linux box. ... You can use it on the command line or from ... This records the audio stream linked to in RealAudio format ...
    (comp.os.linux.misc)
  • Re: Some unanswered questions from January 2011 [telecom]
    ... media stream (for comparison, consider that data compression was only ... is the 'compression' implemented in the codecs themselves (lower D/A ... With UDP (or any other best-efforts delivery ... the TCP retransmissions of lost packets ...
    (comp.dcom.telecom)