Simon Mills (simon++at++hal.wgs.estec.esa.nl)
Thu, 30 Oct 1997 09:41:44 +0100
Joaquin Casillas Melendez wrote:
>
> I am trying to add audio to my pfapplication with the digital media
> library. When playing a sound, the application gets blocked until the end
> of the sound. In order to solve this problem, I have used the libpthread
> library for playing the sound in an alternate line of execution. Sometimes
> it works, and sometimes it crashes. This seems to be a bad solution.
>
> So my questions are:
>
> -Has anyone used Digital media library api from Performer with success?
> -How can I solve the problem of playing a sound while doing graphic stuff?
> (I have also tried to use a forked process without succes).
Yes, I have built my own higher level audio library on top of the
Digital Media Libraries. It is analogous to Performer in that it forks
off a separate audio "rendering" process and communicates via shared
memory. I recommend this because you need a constant stream of audio
data to the audio hardware. My library includes some simple modelling of
effects like attenuation with distance, directional sounds, pitch
bending etc. I've subclassed a "pfSoundSource" node type which
encapsulates a 3D sound source and which can be attached to a Performer
hierarchy. I'm now trying to integrate my pfSoundSource nodes into the
OpenFlight loader so that sound beads in a .flt files can also be
"rendered".
> -Is there a better way to play sounds from performer?
For very simple one-shot sounds you can just try to execute the sfplay
program using a call like 'system("sfplay mysound.aiff");'.
If you want a high-end solution take a look at the AudioWorks product
from Paradigm. http://www.paradigmsim.com
Hope this helps.
-- Regards, Simon====================================================================== Simon Mills Silicon Worlds S.A. c/o System Simulation Section (WAS) Automation & Informatics Department European Space Research And Technology Centre (ESTEC) Postbus 299 e-mail: simon++at++wgs.estec.esa.nl 2200AG Noordwijk phone: +31-(0)71-565-3725 The Netherlands fax: +31-(0)71-565-5419 ====================================================================== ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:09 PDT