Sa-1110 amrv4 Windows CE 4.2

Codec UCB1200

Or

Xscale armv4 Windows CE 4.2

Codec Wolfson wm9712L



Both using MDD-PDD type audio driver.



If SoftwareMixer is disabled, doing a "key click" or a "touch click" seems
to crash MediaPlayer while it's playing a mpeg file.



If SoftwareMixer is active (configure 22 kHz->UCB1200, 44 kHz-> wm9712L), no
problem with MediaPlayer with a "key click" or a "touch click".



BUT when browsing in explorer "key click" or "touch click" are cut before
the end of the sound. Also, if I repeat a "key click" almost all the sound
of the second and next key are cut. Very short wave (370 byte or less) are
not played at all.



Looking in the driver shows that the second and next wave are simply
terminated before the end by a STOP-CLOSE commands.



Do I need to use UAM driver to solve my problem?

I have tried almost all possibilities with Priority256, number of buffer,
dimension of buffer, etc.

Most stable config are:

SoftwareMixer:

Priority256=210, BufferSize=(2048->ucb1200, 4096-> wm9712L), Buffers=4


Wavedev.dll

Priority256=220



Regards

Re: Problem with SoftwareMixer by Damon

Damon
Tue Oct 21 12:13:40 CDT 2003

I see two issues here:
1. no swmixer, key clicks crash app
2. swmixer running, key clicks are truncated

Concerning #1, since the software mixer is not running, the Media Player is
communicating directly with your driver (through the waveAPI of course, but
that's a relatively thin layer which in this scenario amounts mostly to a
pass-through). This is a problem we've seen especially with many legacy
drivers because they often don't keep track of whether or not they are open
or closed (i.e. whether a stream is currently playing). So the media player
is playing an mpeg file, then you do a key click (which means you attempt to
play two sounds simultaneously), the driver doesn't expect that and gets
into a weird state, then the media player tries to pass it's next buffer to
the confused driver and it blows up. I'd suggest looking at your driver to
make sure it does the right thing when a second source calls waveOutOpen.

With #2, this also is a problem we've seen on many legacy drivers, because
they often report that a header is done *playing* when, in fact, it is only
done being copied into the buffer. So the software mixer gets notified that
the last buffer is done before it really is, and we shut down the driver
accordingly. This has the affect of trucating the last little bit of the
sound. The fix is to use the reserved field of the header to keep track of
bytes copied, and then use the dwBytesRecorded to keep track of bytes
actually played out of the speakers. This way WHDR_DONE will not be set
prematurely. Look in the sample PDD drivers in CE .NET 4.2 to see how this
is being done.

--Damon

--
damonb@online.microsoft.com (Remove the 'online.' from my address to
reach me.)
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________
The Windows CE .NET documentation is online at:
http://msdn.microsoft.com/library/en-us/wcelib40/html/pb_start.asp?frame=true


"Francois Duchesneau" <fduchesneau-nospam@daptech.com> wrote in message
news:uQl2F8vlDHA.2488@TK2MSFTNGP12.phx.gbl...
> Sa-1110 amrv4 Windows CE 4.2
>
> Codec UCB1200
>
> Or
>
> Xscale armv4 Windows CE 4.2
>
> Codec Wolfson wm9712L
>
>
>
> Both using MDD-PDD type audio driver.
>
>
>
> If SoftwareMixer is disabled, doing a "key click" or a "touch click" seems
> to crash MediaPlayer while it's playing a mpeg file.
>
>
>
> If SoftwareMixer is active (configure 22 kHz->UCB1200, 44 kHz-> wm9712L),
no
> problem with MediaPlayer with a "key click" or a "touch click".
>
>
>
> BUT when browsing in explorer "key click" or "touch click" are cut before
> the end of the sound. Also, if I repeat a "key click" almost all the sound
> of the second and next key are cut. Very short wave (370 byte or less) are
> not played at all.
>
>
>
> Looking in the driver shows that the second and next wave are simply
> terminated before the end by a STOP-CLOSE commands.
>
>
>
> Do I need to use UAM driver to solve my problem?
>
> I have tried almost all possibilities with Priority256, number of buffer,
> dimension of buffer, etc.
>
> Most stable config are:
>
> SoftwareMixer:
>
> Priority256=210, BufferSize=(2048->ucb1200, 4096-> wm9712L), Buffers=4
>
>
> Wavedev.dll
>
> Priority256=220
>
>
>
> Regards
>
>
>
>