summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2014-06-13 21:37:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-12 03:30:50 +0000
commit9c68ac03f16cc32625f6965e869432eae4fded2d (patch)
tree048251826118491e784077a2cdb3e9e02dc1f208 /media
parent20d16a8af2dc95e827be693edabde4f09eb90c32 (diff)
parentb7f24b101d43139b4c747129bfbc4ecf5c468b86 (diff)
downloadframeworks_av-9c68ac03f16cc32625f6965e869432eae4fded2d.zip
frameworks_av-9c68ac03f16cc32625f6965e869432eae4fded2d.tar.gz
frameworks_av-9c68ac03f16cc32625f6965e869432eae4fded2d.tar.bz2
Merge "AudioSystem: remove unused stream type"
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioSystem.cpp18
-rw-r--r--media/libmedia/AudioTrack.cpp10
2 files changed, 11 insertions, 17 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index eafb3ad..15b32ff 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -242,11 +242,10 @@ status_t AudioSystem::getOutputSamplingRate(uint32_t* samplingRate, audio_stream
return PERMISSION_DENIED;
}
- return getSamplingRate(output, streamType, samplingRate);
+ return getSamplingRate(output, samplingRate);
}
status_t AudioSystem::getSamplingRate(audio_io_handle_t output,
- audio_stream_type_t streamType,
uint32_t* samplingRate)
{
OutputDescriptor *outputDesc;
@@ -265,13 +264,11 @@ status_t AudioSystem::getSamplingRate(audio_io_handle_t output,
gLock.unlock();
}
if (*samplingRate == 0) {
- ALOGE("AudioSystem::getSamplingRate failed for output %d stream type %d",
- output, streamType);
+ ALOGE("AudioSystem::getSamplingRate failed for output %d", output);
return BAD_VALUE;
}
- ALOGV("getSamplingRate() streamType %d, output %d, sampling rate %u", streamType, output,
- *samplingRate);
+ ALOGV("getSamplingRate() output %d, sampling rate %u", output, *samplingRate);
return NO_ERROR;
}
@@ -289,11 +286,10 @@ status_t AudioSystem::getOutputFrameCount(size_t* frameCount, audio_stream_type_
return PERMISSION_DENIED;
}
- return getFrameCount(output, streamType, frameCount);
+ return getFrameCount(output, frameCount);
}
status_t AudioSystem::getFrameCount(audio_io_handle_t output,
- audio_stream_type_t streamType,
size_t* frameCount)
{
OutputDescriptor *outputDesc;
@@ -310,13 +306,11 @@ status_t AudioSystem::getFrameCount(audio_io_handle_t output,
gLock.unlock();
}
if (*frameCount == 0) {
- ALOGE("AudioSystem::getFrameCount failed for output %d stream type %d",
- output, streamType);
+ ALOGE("AudioSystem::getFrameCount failed for output %d", output);
return BAD_VALUE;
}
- ALOGV("getFrameCount() streamType %d, output %d, frameCount %d", streamType, output,
- *frameCount);
+ ALOGV("getFrameCount() output %d, frameCount %d", output, *frameCount);
return NO_ERROR;
}
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index fa8e5c3..e6827ee 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -649,7 +649,7 @@ uint32_t AudioTrack::getSampleRate() const
if (isOffloaded_l()) {
if (mOutput != AUDIO_IO_HANDLE_NONE) {
uint32_t sampleRate = 0;
- status_t status = AudioSystem::getSamplingRate(mOutput, mStreamType, &sampleRate);
+ status_t status = AudioSystem::getSamplingRate(mOutput, &sampleRate);
if (status == NO_ERROR) {
mSampleRate = sampleRate;
}
@@ -889,16 +889,16 @@ status_t AudioTrack::createTrack_l(size_t epoch)
}
size_t afFrameCount;
- status = AudioSystem::getFrameCount(output, mStreamType, &afFrameCount);
+ status = AudioSystem::getFrameCount(output, &afFrameCount);
if (status != NO_ERROR) {
- ALOGE("getFrameCount(output=%d, streamType=%d) status %d", output, mStreamType, status);
+ ALOGE("getFrameCount(output=%d) status %d", output, status);
goto release;
}
uint32_t afSampleRate;
- status = AudioSystem::getSamplingRate(output, mStreamType, &afSampleRate);
+ status = AudioSystem::getSamplingRate(output, &afSampleRate);
if (status != NO_ERROR) {
- ALOGE("getSamplingRate(output=%d, streamType=%d) status %d", output, mStreamType, status);
+ ALOGE("getSamplingRate(output=%d) status %d", output, status);
goto release;
}