protected void processKey ( SoundKey key ) throws Exception { switch ( key . cmd ) { case PLAY : case LOOP : playSound ( key ) ; break ; case LOCK : if ( ! isTesting ( ) ) { synchronized ( _clipCache ) { try { getClipData ( key ) ; // preload // copy cached to lock map _lockedClips . put ( key , _clipCache . get ( key ) ) ; } catch ( Exception e ) { // don't whine about LOCK failures unless we are verbosely logging if ( _verbose . getValue ( ) ) { throw e ; } } } } break ; case UNLOCK : synchronized ( _clipCache ) { _lockedClips . remove ( key ) ; } break ; } }
Process the requested command in the specified SoundKey .