AudioStreamIn and AudioStreamOut

These are immutable, so make the fields const.
getOutput() and getInput() methods are now const.

Change-Id: I128246ebd56ea50b3e542be43f2aa1bcb55f1373
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 6701059..96bc552 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1808,7 +1808,7 @@
 }
 
 
-AudioFlinger::AudioStreamOut* AudioFlinger::PlaybackThread::getOutput()
+AudioFlinger::AudioStreamOut* AudioFlinger::PlaybackThread::getOutput() const
 {
     Mutex::Autolock _l(mLock);
     return mOutput;
@@ -4897,7 +4897,7 @@
     return mTrack;
 }
 
-AudioFlinger::AudioStreamIn* AudioFlinger::RecordThread::getInput()
+AudioFlinger::AudioStreamIn* AudioFlinger::RecordThread::getInput() const
 {
     Mutex::Autolock _l(mLock);
     return mInput;
@@ -5045,6 +5045,7 @@
 
     if (thread->type() != ThreadBase::DUPLICATING) {
         AudioStreamOut *out = thread->clearOutput();
+        assert(out != NULL);
         // from now on thread->mOutput is NULL
         out->hwDev->close_output_stream(out->hwDev, out->stream);
         delete out;
@@ -5186,6 +5187,7 @@
     thread->exit();
 
     AudioStreamIn *in = thread->clearInput();
+    assert(in != NULL);
     // from now on thread->mInput is NULL
     in->hwDev->close_input_stream(in->hwDev, in->stream);
     delete in;