AudioBufferProvider comments and cleanup

Add comments about which methods implement the AudioBufferProvider interface.

Simplified the definition of kInvalidPts.  <stdint.h> is very hard to work
with, there seems to be no way to use it reliably to get INT64_MAX without
having a separate source file, which is ugly because it means kInvalidPts
is not a compile-time constant.  So I just deleted AudioBufferProvider.cpp
and used a hard-coded constant instead.

Added a default constructor for Buffer so that the fields aren't random
(especially .raw which is used to determine if the buffer is valid).

Make the pts for getNextBuffer default to kInvalidPTS so code that
doesn't need a pts doesn't have to specify a value.

Rename the parameter to AudioMixer::setBufferProvider to make it clearer.

Change-Id: I87e7290884d4ed975b019f62d1ab6ae2bc5065a5
diff --git a/services/audioflinger/AudioBufferProvider.h b/services/audioflinger/AudioBufferProvider.h
index 62ad6bd..43e4de7 100644
--- a/services/audioflinger/AudioBufferProvider.h
+++ b/services/audioflinger/AudioBufferProvider.h
@@ -17,8 +17,6 @@
 #ifndef ANDROID_AUDIO_BUFFER_PROVIDER_H
 #define ANDROID_AUDIO_BUFFER_PROVIDER_H
 
-#include <stdint.h>
-#include <sys/types.h>
 #include <utils/Errors.h>
 
 namespace android {
@@ -29,6 +27,7 @@
 public:
 
     struct Buffer {
+        Buffer() : raw(NULL), frameCount(0) { }
         union {
             void*       raw;
             short*      i16;
@@ -40,12 +39,12 @@
     virtual ~AudioBufferProvider() {}
 
     // value representing an invalid presentation timestamp
-    static const int64_t kInvalidPTS;
+    static const int64_t kInvalidPTS = 0x7FFFFFFFFFFFFFFFLL;    // <stdint.h> is too painful
 
     // pts is the local time when the next sample yielded by getNextBuffer
     // will be rendered.
     // Pass kInvalidPTS if the PTS is unknown or not applicable.
-    virtual status_t getNextBuffer(Buffer* buffer, int64_t pts) = 0;
+    virtual status_t getNextBuffer(Buffer* buffer, int64_t pts = kInvalidPTS) = 0;
 
     virtual void releaseBuffer(Buffer* buffer) = 0;
 };