summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/AudioFlinger.cpp11
-rw-r--r--services/audioflinger/AudioFlinger.h1
-rwxr-xr-xservices/audioflinger/Threads.cpp6
-rw-r--r--services/audioflinger/Threads.h1
4 files changed, 3 insertions, 16 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index bb17221..2124f85 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -668,17 +668,6 @@ uint32_t AudioFlinger::sampleRate(audio_io_handle_t output) const
return thread->sampleRate();
}
-int AudioFlinger::channelCount(audio_io_handle_t output) const
-{
- Mutex::Autolock _l(mLock);
- PlaybackThread *thread = checkPlaybackThread_l(output);
- if (thread == NULL) {
- ALOGW("channelCount() unknown thread %d", output);
- return 0;
- }
- return thread->channelCount();
-}
-
audio_format_t AudioFlinger::format(audio_io_handle_t output) const
{
Mutex::Autolock _l(mLock);
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index f6a0182..4df0921 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -126,7 +126,6 @@ public:
status_t *status /*non-NULL*/);
virtual uint32_t sampleRate(audio_io_handle_t output) const;
- virtual int channelCount(audio_io_handle_t output) const;
virtual audio_format_t format(audio_io_handle_t output) const;
virtual size_t frameCount(audio_io_handle_t output) const;
virtual uint32_t latency(audio_io_handle_t output) const;
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 1dcaff8..11d13a8 100755
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -1815,7 +1815,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l()
LOG_FATAL("HAL format %#x not supported for mixed output",
mFormat);
}
- mFrameSize = audio_stream_frame_size(&mOutput->stream->common);
+ mFrameSize = audio_stream_out_frame_size(mOutput->stream);
mBufferSize = mOutput->stream->common.get_buffer_size(&mOutput->stream->common);
mFrameCount = mBufferSize / mFrameSize;
if (mFrameCount & 15) {
@@ -4466,7 +4466,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
size_t audioHALFrames =
(mOutput->stream->get_latency(mOutput->stream)*mSampleRate) / 1000;
size_t framesWritten =
- mBytesWritten / audio_stream_frame_size(&mOutput->stream->common);
+ mBytesWritten / audio_stream_out_frame_size(mOutput->stream);
track->presentationComplete(framesWritten, audioHALFrames);
track->reset();
tracksToRemove->add(track);
@@ -6013,7 +6013,7 @@ void AudioFlinger::RecordThread::readInputParameters_l()
if (mFormat != AUDIO_FORMAT_PCM_16_BIT) {
ALOGE("HAL format %#x not supported; must be AUDIO_FORMAT_PCM_16_BIT", mFormat);
}
- mFrameSize = audio_stream_frame_size(&mInput->stream->common);
+ mFrameSize = audio_stream_in_frame_size(mInput->stream);
mBufferSize = mInput->stream->common.get_buffer_size(&mInput->stream->common);
mFrameCount = mBufferSize / mFrameSize;
// This is the formula for calculating the temporary buffer size.
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 1493c60..c265833 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -233,7 +233,6 @@ public:
// dynamic externally-visible
uint32_t sampleRate() const { return mSampleRate; }
- uint32_t channelCount() const { return mChannelCount; }
audio_channel_mask_t channelMask() const { return mChannelMask; }
audio_format_t format() const { return mFormat; }
// Called by AudioFlinger::frameCount(audio_io_handle_t output) and effects,