summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/AudioSystem.cpp2
-rw-r--r--media/libmedia/AudioTrack.cpp20
-rw-r--r--media/libmedia/IAudioFlinger.cpp2
3 files changed, 2 insertions, 22 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 758e660..195aadf 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -430,7 +430,7 @@ uint32_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle)
int AudioSystem::newAudioSessionId()
{
const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
- if (af == 0) return 0;
+ if (af == 0) return AUDIO_SESSION_ALLOCATE;
return af->newAudioSessionId();
}
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index fa7249b..6bb8118 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -371,16 +371,6 @@ status_t AudioTrack::set(
mAudioTrackThread->requestExitAndWait();
mAudioTrackThread.clear();
}
- // Use of direct and offloaded output streams is ref counted by audio policy manager.
-#if 0 // FIXME This should no longer be needed
- //Use of direct and offloaded output streams is ref counted by audio policy manager.
- // As getOutput was called above and resulted in an output stream to be opened,
- // we need to release it.
- if (mOutput != 0) {
- AudioSystem::releaseOutput(mOutput);
- mOutput = 0;
- }
-#endif
return status;
}
@@ -1775,16 +1765,6 @@ status_t AudioTrack::restoreTrack_l(const char *from)
}
}
if (result != NO_ERROR) {
- // Use of direct and offloaded output streams is ref counted by audio policy manager.
-#if 0 // FIXME This should no longer be needed
- //Use of direct and offloaded output streams is ref counted by audio policy manager.
- // As getOutput was called above and resulted in an output stream to be opened,
- // we need to release it.
- if (mOutput != 0) {
- AudioSystem::releaseOutput(mOutput);
- mOutput = 0;
- }
-#endif
ALOGW("restoreTrack_l() failed status %d", result);
mState = STATE_STOPPED;
}
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index 762681e..f28b82d 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -599,7 +599,7 @@ public:
Parcel data, reply;
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
status_t status = remote()->transact(NEW_AUDIO_SESSION_ID, data, &reply);
- int id = 0;
+ int id = AUDIO_SESSION_ALLOCATE;
if (status == NO_ERROR) {
id = reply.readInt32();
}