Re: WaveOutWrite and Sockets



You can't use datagrams and the emulator reliably in my experience. UDP
support in the interface layer between the emulator and the host system is
spotty. You must use a real device for this sort of code. I think that
you'll probably find that, other than the lack of reliable delivery and lack
of serialization in UDP, running on the device will probably work fine. You
*have* considered the fact that a UDP packet can be sent but not ever
arrived, right? And you *have* considered the fact that two UDP packets
sent in order, 1 then 2, may arrive at the client in the reverse order, 2
then 1, right?

Paul T.

"Black_angel" <Blackangel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:50082AED-667F-41DA-A216-48C2A1ABACB0@xxxxxxxxxxxxxxxx
> hello,
>
>
> I haven't got any Pocket PC device, so I am developing with the PPC2003
> emulator.
> The call witch returns the parameter error is the "WaveOutWrite" function.
> In the WaveOut.cs
> there's a function called "Play" where, when I have a audio packet,
> playback
> it.
> At the begining, this function "WaveOutWrite" returns 0 (NOERROR) but
> then,
> when 5'30"
> (more or less) pass this function returns 11 (INVALPARAM) and the audio
> doesn't playback any more.
> It's not an exception, when this happens the application continues, but
> the
> sound stops.
> If you put a interruption point in the WaveOutWrite function in the
> debugger
> you can see it.
> If a packet doesn't arrive don't mind. In the code that you have, when I
> send a packet
> I cut it in two parts because the size is very long (more than 1500bytes),
> and then, when
> the 2 pieces arrive I join them.
> Yesterday I used a lower format: 8000HZ 8bits 1 channel and with this
> format
> the packet has
> the size of 800bytes so I didn't cut the packet but the error appears too.
> When I add a packet to the queue "ColaReproduccion.cs" I sort the
> ArrayList,
> I should control
> if the timestamp is higuer to not add it but at the moment I don't manage
> that.
> However,even if the audio is mix, the WaveOutWrite should playback it
> (listening bad but
> listening something) because the PCI format hasn't any compression codec.
> If you have any other question, I'll be delighted to answer you.
>
> Regards and thank you very much.
>
>
>
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> And just to be sure, you 1) are *not* using the emulator and, 2) are
>> *not*
>> using ActiveSync as your network transport, right?
>>
>> Paul T.
>>
>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>> wrote in message news:e0M8aucRFHA.3928@xxxxxxxxxxxxxxxxxxxxxxx
>> > That's fine. You must be using the Web interface to the newsgroup;
>> > regular newsreaders allow attachments...
>> >
>> > I'm sorry, but I can't get it to build for Windows CE.NET and I have no
>> > PPC devices. I need a higher-level description of what's supposed to
>> > be
>> > happening. What call EXACTLY returns the parameter error? What other
>> > information is included in the exception? How are you handling the
>> > case
>> > where a UDP packet is sent, but never arrives? Can packets be handled
>> > when they arrive in a different order than they were sent?
>> >
>> > Paul T.
>


.



Relevant Pages

  • Re: TCP Blocking sockets
    ... the tcp buffers don't fill up etc due to slow link speeds. ... With TCP/IP the receiving system will wait for the packet to ... >arrives, ... UDP doesn't ensure you data delivery, ...
    (alt.comp.lang.borland-delphi)
  • Re: Determining if it is "safe" to send UDP packets
    ... for receiving Udp data. ... I'm receiving from a camera lines of data at 55 Hz. ... the next packet hits the wire. ... Another problem with TCP is its assumption that a lost packet is due to ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Incoherent E-mails
    ... The Novell crap was originally run on IPX ... The term in the early-mid nineties was "packet storm". ... The original advantage of UDP was ... > 60 bytes for TCP. ...
    (alt.computer.security)
  • Re: Linux equivalent for ioctlsocket(FIONREAD) on datagram sockets
    ... blocking and non-blocking UDP sends are essentially the same. ... UDP is defined us unreliable. ... achieves packet error rate of ~1E-7 but hits the wall when we try to ... shouldn't want:(to receive UDP datagrams at low error rate. ...
    (comp.os.linux.development.apps)
  • Re: recvfrom() strange operation
    ... no matter what your network looks ... discover packet loss, partially loss and joinde packet and octett ... And the most important sfrtp working fine over TCP or UDP ... "frames" (or whatever you are calling your higher layer protocol ...
    (comp.os.linux.development.system)