[nas] Question regarding performance of playRaw and AuHandleEvents()

Matt Prazak prazak_lists at yahoo.com
Mon Jun 21 18:07:35 MDT 2004


I have been trying out the NAS plugin for libao (for audio output from
Ogg Vorbis tools, e.g., ogg123), but have had trouble getting that
driver working on my platform, Solaris 9/SPARC 12/02.  I am now trying
piping the output of ogg123 directly to playRaw from NAS' example
programs:

  ogg123 --device=raw --file=- filename.ogg |
.../nas-1.6/clients/audio/examples/playRaw -

This method works very well from an sound quality point-of-view, but
the CPU utilization of playRaw is very high.  Profiling reveals that
playRaw's event handler loop is the culprit, where both playRaw and the
AuHandleEvents() function use inefficient while(1) loops for handling
things.

Is there a better way in libaudio to implement playRaw to drop the CPU
utilization?  There looks to be an opportunity for an
order-of-magnitude improvement if there is a way around the while(1)
loops.


Matt




		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail



More information about the Nas mailing list