libvideoeditor: convert to use new audio.h

Change-Id: I39726f6f6cd5aabbd91629f329876660b3d3cec2
Signed-off-by: Dima Zavin <dima@android.com>
diff --git a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
index a83e7b6..1628d33 100755
--- a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
+++ b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
@@ -28,6 +28,8 @@
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/MetaData.h>
 
+#include <hardware/audio.h>
+
 #include "PreviewPlayer.h"
 namespace android {
 
@@ -299,7 +301,7 @@
 
     if (mAudioSink.get() != NULL) {
         status_t err = mAudioSink->open(
-                mSampleRate, numChannels, AudioSystem::PCM_16_BIT,
+                mSampleRate, numChannels, AUDIO_FORMAT_PCM_16_BIT,
                 DEFAULT_AUDIOSINK_BUFFERCOUNT,
                 &VideoEditorAudioPlayer::AudioSinkCallback, this);
         if (err != OK) {
@@ -321,10 +323,10 @@
         mAudioSink->start();
     } else {
         mAudioTrack = new AudioTrack(
-                AudioSystem::MUSIC, mSampleRate, AudioSystem::PCM_16_BIT,
+                AUDIO_STREAM_MUSIC, mSampleRate, AUDIO_FORMAT_PCM_16_BIT,
                 (numChannels == 2)
-                    ? AudioSystem::CHANNEL_OUT_STEREO
-                    : AudioSystem::CHANNEL_OUT_MONO,
+                    ? AUDIO_CHANNEL_OUT_STEREO
+                    : AUDIO_CHANNEL_OUT_MONO,
                 0, 0, &AudioCallback, this, 0);
 
         if ((err = mAudioTrack->initCheck()) != OK) {
diff --git a/libvideoeditor/lvpp/VideoEditorPlayer.cpp b/libvideoeditor/lvpp/VideoEditorPlayer.cpp
index cea1576..2ca7996 100755
--- a/libvideoeditor/lvpp/VideoEditorPlayer.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPlayer.cpp
@@ -24,6 +24,8 @@
 

 #include <media/Metadata.h>

 #include <media/stagefright/MediaExtractor.h>

+
+#include <hardware/audio.h>
 

 namespace android {

 

@@ -306,7 +308,7 @@
     : mCallback(NULL),

       mCallbackCookie(NULL) {

     mTrack = 0;

-    mStreamType = AudioSystem::MUSIC;

+    mStreamType = AUDIO_STREAM_MUSIC;

     mLeftVolume = 1.0;

     mRightVolume = 1.0;

     mLatency = 0;

@@ -415,7 +417,7 @@
                 sampleRate,

                 format,

                 (channelCount == 2) ?

-                 AudioSystem::CHANNEL_OUT_STEREO : AudioSystem::CHANNEL_OUT_MONO,

+                 AUDIO_CHANNEL_OUT_STEREO : AUDIO_CHANNEL_OUT_MONO,

                 frameCount,

                 0 /* flags */,

                 CallbackWrapper,

@@ -426,7 +428,7 @@
                 sampleRate,

                 format,

                 (channelCount == 2) ?

-                 AudioSystem::CHANNEL_OUT_STEREO : AudioSystem::CHANNEL_OUT_MONO,

+                 AUDIO_CHANNEL_OUT_STEREO : AUDIO_CHANNEL_OUT_MONO,

                 frameCount);

     }