diff options
author | Glenn Kasten <gkasten@google.com> | 2014-03-26 23:23:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-26 23:23:09 +0000 |
commit | c9b8d90dabdf1234be0117c592f635a92c4eb0d9 (patch) | |
tree | 8bbeb033b0eb0bcbbfb12faaa6f2133d3cd093ea /media/libmedia | |
parent | 5c4fa907328c8ee586367272c7525cb87742f14d (diff) | |
parent | 142f519aa1acd5804d111e60d100f170fed28405 (diff) | |
download | frameworks_av-c9b8d90dabdf1234be0117c592f635a92c4eb0d9.zip frameworks_av-c9b8d90dabdf1234be0117c592f635a92c4eb0d9.tar.gz frameworks_av-c9b8d90dabdf1234be0117c592f635a92c4eb0d9.tar.bz2 |
Merge "Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>"
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 14 | ||||
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 10 |
3 files changed, 13 insertions, 13 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 961b0a2..a7bf380 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -471,7 +471,7 @@ status_t AudioRecord::openRecord_l(size_t epoch) audio_io_handle_t input = AudioSystem::getInput(mInputSource, mSampleRate, mFormat, mChannelMask, mSessionId); - if (input == 0) { + if (input == AUDIO_IO_HANDLE_NONE) { ALOGE("Could not get audio input for record source %d, sample rate %u, format %#x, " "channel mask %#x, session %d", mInputSource, mSampleRate, mFormat, mChannelMask, mSessionId); diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index a2cb619..2f16444 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -196,12 +196,12 @@ String8 AudioSystem::getParameters(audio_io_handle_t ioHandle, const String8& ke status_t AudioSystem::setParameters(const String8& keyValuePairs) { - return setParameters((audio_io_handle_t) 0, keyValuePairs); + return setParameters(AUDIO_IO_HANDLE_NONE, keyValuePairs); } String8 AudioSystem::getParameters(const String8& keys) { - return getParameters((audio_io_handle_t) 0, keys); + return getParameters(AUDIO_IO_HANDLE_NONE, keys); } // convert volume steps to natural log scale @@ -284,7 +284,7 @@ status_t AudioSystem::getOutputFrameCount(size_t* frameCount, audio_stream_type_ } output = getOutput(streamType); - if (output == 0) { + if (output == AUDIO_IO_HANDLE_NONE) { return PERMISSION_DENIED; } @@ -329,7 +329,7 @@ status_t AudioSystem::getOutputLatency(uint32_t* latency, audio_stream_type_t st } output = getOutput(streamType); - if (output == 0) { + if (output == AUDIO_IO_HANDLE_NONE) { return PERMISSION_DENIED; } @@ -413,7 +413,7 @@ uint32_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); uint32_t result = 0; if (af == 0) return result; - if (ioHandle == 0) return result; + if (ioHandle == AUDIO_IO_HANDLE_NONE) return result; result = af->getInputFramesLost(ioHandle); return result; @@ -464,7 +464,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle const OutputDescriptor *desc; audio_stream_type_t stream; - if (ioHandle == 0) return; + if (ioHandle == AUDIO_IO_HANDLE_NONE) return; Mutex::Autolock _l(AudioSystem::gLock); @@ -738,7 +738,7 @@ audio_io_handle_t AudioSystem::getOutputForEffect(const effect_descriptor_t *des { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); // FIXME change return type to status_t, and return PERMISSION_DENIED here - if (aps == 0) return 0; + if (aps == 0) return AUDIO_IO_HANDLE_NONE; return aps->getOutputForEffect(desc); } diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 22760d9..fbfd3da 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -546,7 +546,7 @@ void AudioTrack::pause() mAudioTrack->pause(); if (isOffloaded_l()) { - if (mOutput != 0) { + if (mOutput != AUDIO_IO_HANDLE_NONE) { uint32_t halFrames; // OffloadThread sends HAL pause in its threadLoop.. time saved // here can be slightly off @@ -633,7 +633,7 @@ uint32_t AudioTrack::getSampleRate() const // query the HAL and update if needed. // FIXME use Proxy return channel to update the rate from server and avoid polling here if (isOffloaded_l()) { - if (mOutput != 0) { + if (mOutput != AUDIO_IO_HANDLE_NONE) { uint32_t sampleRate = 0; status_t status = AudioSystem::getSamplingRate(mOutput, mStreamType, &sampleRate); if (status == NO_ERROR) { @@ -779,7 +779,7 @@ status_t AudioTrack::getPosition(uint32_t *position) const return NO_ERROR; } - if (mOutput != 0) { + if (mOutput != AUDIO_IO_HANDLE_NONE) { uint32_t halFrames; AudioSystem::getRenderPosition(mOutput, &halFrames, &dspFrames); } @@ -855,7 +855,7 @@ status_t AudioTrack::createTrack_l(size_t epoch) audio_io_handle_t output = AudioSystem::getOutput(mStreamType, mSampleRate, mFormat, mChannelMask, mFlags, mOffloadInfo); - if (output == 0) { + if (output == AUDIO_IO_HANDLE_NONE) { ALOGE("Could not get audio output for stream type %d, sample rate %u, format %#x, " "channel mask %#x, flags %#x", mStreamType, mSampleRate, mFormat, mChannelMask, mFlags); @@ -1798,7 +1798,7 @@ status_t AudioTrack::getTimestamp(AudioTimestamp& timestamp) String8 AudioTrack::getParameters(const String8& keys) { audio_io_handle_t output = getOutput(); - if (output != 0) { + if (output != AUDIO_IO_HANDLE_NONE) { return AudioSystem::getParameters(output, keys); } else { return String8::empty(); |