diff options
author | Dima Zavin <dima@android.com> | 2011-04-19 22:30:36 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-04-27 13:10:10 -0700 |
commit | fce7a473248381cc83a01855f92581077d3c9ee2 (patch) | |
tree | e002e1edd8a11f2be56ce9538ab1b13aa289bc9e /media/libstagefright | |
parent | db5cb14318bb24cd6ea14ff7ceea0d5e1f83d903 (diff) | |
download | frameworks_av-fce7a473248381cc83a01855f92581077d3c9ee2.zip frameworks_av-fce7a473248381cc83a01855f92581077d3c9ee2.tar.gz frameworks_av-fce7a473248381cc83a01855f92581077d3c9ee2.tar.bz2 |
audio/media: convert to using the audio HAL and new audio defs
Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/AudioPlayer.cpp | 8 | ||||
-rw-r--r-- | media/libstagefright/AudioSource.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index fcea848..69f9c23 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -110,7 +110,7 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) { 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, &AudioPlayer::AudioSinkCallback, this); if (err != OK) { @@ -132,10 +132,10 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) { 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/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index bbdec02..99c3682 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -60,8 +60,8 @@ AudioSource::AudioSource( AudioRecord::RECORD_NS_ENABLE | AudioRecord::RECORD_IIR_ENABLE; mRecord = new AudioRecord( - inputSource, sampleRate, AudioSystem::PCM_16_BIT, - channels > 1? AudioSystem::CHANNEL_IN_STEREO: AudioSystem::CHANNEL_IN_MONO, + inputSource, sampleRate, AUDIO_FORMAT_PCM_16_BIT, + channels > 1? AUDIO_CHANNEL_IN_STEREO: AUDIO_CHANNEL_IN_MONO, 4 * kMaxBufferSize / sizeof(int16_t), /* Enable ping-pong buffers */ flags, AudioRecordCallbackFunction, |