On Wed, June 3, 2009 7:35 am, [email protected] wrote:
> ahh, ok,
> thank you for explaining this. i agree. if that is, what you do in your
> patch?! i see no
> problem to check it in. looks like this will solve the problem. without
> using many extra
> time in audioEngine_process. think check one bool don't sucks to many time
> :-).

No prob.  Here's how the "no zombies" patch does it (comments added):

int audioEngine_process( uint32_t nframes, void* /*arg*/ )
{
        static QString me("audioEngine_process");

        // Bail out quick if we're not able to process
        // Audio.
        if( (m_audioEngineState != STATE_READY)
                && (m_audioEngineState != STATE_PLAYING) ) {
                return 0;
        }

        // Bail out quick if someone else has the lock.  I'm
        // pretty sure that loading a drumkit secures this lock
        // (already), and that no extra state manip. is currently
        // needed for that... but I plan to look into this a
        // little more.
        if ( AudioEngine::get_instance()->try_lock( me ) == false ) {
                return 0;
        }

        // Now that we have the mutex locked, do the same check
        // as above and bail out if the state changed.
        if( (m_audioEngineState != STATE_READY)
            && (m_audioEngineState != STATE_PLAYING) ) {
                AudioEngine::get_instance()->unlock();
            return 0;
        }

The "no zombies" patch isn't ready to be applied to trunk because:

  * it totally removes all logging -- and I don't think
    that's acceptable.

  * Need to decide what to do with AudioEngine::__locker.
    If we're not going to use it... it should be removed rather
    than ignored.

  * I want to change the state check to:
      if ( m_audioEngineState < STATE_READY )

  * I accidentally left some JACK headers in hydrogen.cpp.  :-)

Peace,
Gabriel

-- 
               G a b r i e l   M   B e d d i n g f i e l d


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to