             trace("=======================================================");
         }
 
+        private function sleep(ms:int):void {
+            var init:int = getTimer();
+            while(true) {
+                if(getTimer() - init >= ms) {
+                    break;
+                }
+            }
+        }
+
     }
 }

            assertTrue("outputFormat set to " + format, encoder.getOutputFormat() == format);
            assertTrue("outputLength = audioPcmAsset.length = " + audioPcmAsset.length, encoder.getOutputLength() == audioPcmAsset.length);
            assertTrue("output.length = audioPcmAsset.length = " + audioPcmAsset.length, output.length == audioPcmAsset.length);
            
            encoder.dispose(0);
        }
    


import flash.events.Event;
import flash.utils.ByteArray;
import flash.utils.getTimer;

import mx.core.ByteArrayAsset;
import mx.core.UIComponent;
