The first thing to do is to see if the hxauddev layer is
getting enough audio data. Put a printf in _imp_write and
log how much data is being written and how often. Since
you know the sample rate/width and number of channels of
the audio you can tell how much data was written in seconds.
Compare this to how often write is called and you should be
able to tell if the gaps are coming from the media engine
or are being generated below in the hardware or audio code.

Make sure that the audio device is really being opened up
in the correct format.

Make sure all ::write() calls to OSS are OK. If they don't
write all of the data or something that can be bad.

Make sure the timeline coming back from the audio device
is good (very important).

Make sure you set the GetOSpace bool correctly. If the
GetODelay call fails that one can as well. This could
result in the OSS call write() blocking and starving the
rest of the engine for time (assuming no threads).

--greg.




Leon Qiu wrote:
> Greg,
>  
> when the simpleplayer plays clips containing both video and audio, the 
> audio may disappear randomly, and once the audio disapears, it keeps 
> silent ever since then. it happens even the complexity of the media is 
> very low and the decoding of audio and video only takes about 50% cpu. 
> Can you help me to find out what may cause this problem? Thanks.
>  
> one thing I want to point out is, the OS uses linux default OSS audio 
> driver. originally the simpleplayer plays audio with wrong frequency. 
> then I find the line in audio/device/platform/unix/audlinux_oss.cpp does 
> not return correct value, and it does not support ODELAY correctly: 
>  theErr = ::ioctl(m_nDevID, SNDCTL_DSP_GETODELAY, &bytes2);
> so I just comment it out and the simpleplayer can player audio 
> correctly, but the problem above happens.
>  
> The profile of the device:
> OS: linux 2.2
> CPU: ARM920T 206MHz
> RAM: 32M
>  
> the build option of simpleplayer:
> branch: hxclient_1_3_0_neptunex_restricted
> platform: linux-2.2-libc6-armv4l-cross-gcc2.95
> distribution/archive from: linux-2.2-libc6-armv4l-gcc2.95
> build Type: release
> build options: release
> profile: /home/leon/helix/build/umakepf/helix-client-local-ra-rv-mp3
> cvs revision: hxclient_1_3_0_neptunex
> copy target: release
> target(s): splay
> $Id: umake.py,v 1.45 2004/10/12 22:08:26 hubbe Exp $
> C Compiler: arm-linux-gcc
> Reading specs from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
> C++ Compiler: arm-linux-g++
> Reading specs from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
>  
>  
> Leon
>  
>  

_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to