Usages of

android.media.audiofx.NoiseSuppressor.release()
private NoiseSuppressor noiseSuppressor = null; // code omitted ... public void releaseNoiseSuppressor() { if (noiseSuppressor != null) { noiseSuppressor.setEnabled(false); noiseSuppressor.release(); noiseSuppressor = null; } }
NoiseSuppressor m_NoiseSuppressor; // code omitted ... public boolean NoiseRelease() { if(m_NoiseSuppressor!=null) { m_NoiseSuppressor.setEnabled(false); m_NoiseSuppressor.release(); return true; } return false; }
private static NoiseSuppressor nsInstance; // code omitted ... public static void releaseNS(){ if(nsInstance != null){ nsInstance.setEnabled(false); nsInstance.release(); nsInstance = null; recordReady = false; } }
private NoiseSuppressor noiseSuppressor = null; // code omitted ... private void releaseAudioRecord(){ audioRecord.release(); audioRecord = null; if(noiseSuppressor != null){ noiseSuppressor.release(); noiseSuppressor = null; } }
public NoiseSuppressor ns; // code omitted ... protected void finalize() { Log.i(TAG, "Release everything"); arec.stop(); arec.release(); atrack.stop(); atrack.release(); aec = null; ns.release(); }
//Test case 1.1: test NS creation and release public void test1_1NsCreateAndRelease() throws Exception { AudioRecord ar = getAudioRecord(); assertNotNull("could not create AudioRecord", ar); boolean isAvailable = NoiseSuppressor.isAvailable(); NoiseSuppressor ns = NoiseSuppressor.create(ar.getAudioSessionId()); assertTrue("NS not available but created or available and not created", isAvailable == (ns != null)); if (ns != null) { ns.release(); } ar.release(); }
private NoiseSuppressor ns = null; // code omitted ... // to other applications or the native resources released. public void release() { Logging.d(TAG, "release"); if (aec != null) { aec.release(); aec = null; } if (ns != null) { ns.release(); ns = null; } }
//Test case 1.1: test NS creation and release public void test1_1NsCreateAndRelease() throws Exception { if (!hasMicrophone()) { return; } AudioRecord ar = getAudioRecord(); assertNotNull("could not create AudioRecord", ar); boolean isAvailable = NoiseSuppressor.isAvailable(); NoiseSuppressor ns = NoiseSuppressor.create(ar.getAudioSessionId()); assertTrue("NS not available but created or available and not created", isAvailable == (ns != null)); if (ns != null) { ns.release(); } ar.release(); }
private NoiseSuppressor mNoiseSuppressor; // code omitted ... @Override public void close() { //mAudioRecord.stop(); mAudioRecord.release(); if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { if(mAcousticEchoCanceler != null) { mAcousticEchoCanceler.release(); mAcousticEchoCanceler = null; } if(mNoiseSuppressor != null) { mNoiseSuppressor.release(); mNoiseSuppressor = null; } } }
private NoiseSuppressor ns = null; // code omitted ... // to other applications or the native resources released. public void release() { Logging.d(TAG, "release"); if (aec != null) { aec.release(); aec = null; } if (agc != null) { agc.release(); agc = null; } if (ns != null) { ns.release(); ns = null; } }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes