Stéphane Letz wrote: > Le 8 oct. 08 à 22:21, Dev Mazumdar a écrit : > >> Hannu Savolainen wrote: >>> Stéphane Letz wrote: >>>> Ok. Now testing with O_EXCL and SNDCTL_DSP_COOKEDMODE works, bit >>>> I see >>>> some strange of the device. The overruns/underrun detection code >>>> based >>>> on SNDCTL_DSP_GETERROR does not see underrun anymore although the >>>> sound get weird with high CPU load (Writing another buffer in the >>>> out >>>> device solve the "weird sound" problem...). The same overruns/ >>>> underrun >>>> detection code was working when opening the /dev/dsp0 device (that >>>> uses vmix AFAIK) >>>> >>>> This occurs on OpenSolaris with internal HDAudio using published OSS >>>> 4.0. Are tey know problems with this card with OSS 4.0 ? >>>> >>> I don't think this is caused by problems with any particular card. >>> Underruns/overruns will happen if the CPU load gets too high (more >>> than >>> 80-90%). In this situation the application is not able to process >>> audio >>> data as fast as it should. It's often possible to decrease the >>> problem >>> by using higher priority (see man sched_setscheduler). >>> >>> It is just necessary to write enough silent data to the output device >>> before starting the read/write loop. It is normal that the other >>> processes running in the computer occasionally delay the audio >>> process >>> by few milliseconds. If there is not enough data in the playback >>> buffer >>> then this delay will cause an underrun. In addition recorded data >>> will >>> get accumulated in the recording device during the delay. This will >>> sooner or later cause recording overruns if the application doesn't >>> handle this properly. Simple read/write loop (without any >>> usleep/whatever calls) will recover from this situation >>> automatically. >>> >>> Best regards, >>> >>> Hannu >>> _______________________________________________ >>> oss-devel mailing list >>> oss-devel@mailman.opensound.com >>> http://mailman.opensound.com/mailman/listinfo/oss-devel >>> >> Hi, >> >> Have you tried to use the fulldup.c test program to see if this works >> http://mercurial.opensound.com/?file/2fed97c765ec/tutorials/sndkit/ >> samples/fulldup.c > > I'll try. >> >> If fulldup.c shows problems then there are issues with vmix. >> >> Have you tried disabling vmix to see if the native device behaves >> differently than the vmix device? > > Underruns/overruns works when used with vmix device (/dev/dsp0), bit > not when opening othesr (non vmix devices like /dev/dsp1) in OX_ECL > and using SNDCTL_DSP_COOKEDMODE. > > Regards > > Stephane Letz > _______________________________________________ > oss-devel mailing list > oss-devel@mailman.opensound.com > http://mailman.opensound.com/mailman/listinfo/oss-devel >
This indicates that the vmix device is at fault.....we have seen number of posts saying that VMIX causes a high load - however I'm not convinced that the CPU is getting starved and causing underruns - we aren't dealing with 386 or 486 class CPUs. regards Dev -- -------------------------------------------------------------------------- 4Front Technologies 4035 Lafayette Place, Unit F, Culver City, CA 90232, USA Tel: 310 202 8530 Fax: 310 202 0496 URL: http://www.opensound.com -------------------------------------------------------------------------- _______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel