summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioTrack.cpp17
-rw-r--r--media/libmedia/IAudioFlinger.cpp6
-rw-r--r--media/libmedia/JetPlayer.cpp2
-rw-r--r--media/libmedia/ToneGenerator.cpp2
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp4
-rw-r--r--media/libstagefright/AudioPlayer.cpp2
6 files changed, 17 insertions, 16 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index a1c99e5..34563ca 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -92,7 +92,7 @@ AudioTrack::AudioTrack(
audio_format_t format,
int channelMask,
int frameCount,
- uint32_t flags,
+ audio_policy_output_flags_t flags,
callback_t cbf,
void* user,
int notificationFrames,
@@ -119,10 +119,11 @@ AudioTrack::AudioTrack(
int notificationFrames,
int sessionId)
: mStatus(NO_INIT),
+ mIsTimed(false),
mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(ANDROID_TGROUP_DEFAULT)
{
mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask,
- frameCount, flags, cbf, user, notificationFrames,
+ frameCount, (audio_policy_output_flags_t)flags, cbf, user, notificationFrames,
0, false, sessionId);
}
@@ -132,7 +133,7 @@ AudioTrack::AudioTrack(
audio_format_t format,
int channelMask,
const sp<IMemory>& sharedBuffer,
- uint32_t flags,
+ audio_policy_output_flags_t flags,
callback_t cbf,
void* user,
int notificationFrames,
@@ -172,7 +173,7 @@ status_t AudioTrack::set(
audio_format_t format,
int channelMask,
int frameCount,
- uint32_t flags,
+ audio_policy_output_flags_t flags,
callback_t cbf,
void* user,
int notificationFrames,
@@ -221,7 +222,7 @@ status_t AudioTrack::set(
// force direct flag if format is not linear PCM
if (!audio_is_linear_pcm(format)) {
- flags |= AUDIO_POLICY_OUTPUT_FLAG_DIRECT;
+ flags = (audio_policy_output_flags_t) (flags | AUDIO_POLICY_OUTPUT_FLAG_DIRECT);
}
if (!audio_is_output_channel(channelMask)) {
@@ -233,7 +234,7 @@ status_t AudioTrack::set(
audio_io_handle_t output = AudioSystem::getOutput(
streamType,
sampleRate, format, channelMask,
- (audio_policy_output_flags_t)flags);
+ flags);
if (output == 0) {
ALOGE("Could not get audio output for stream type %d", streamType);
@@ -707,7 +708,7 @@ audio_io_handle_t AudioTrack::getOutput()
audio_io_handle_t AudioTrack::getOutput_l()
{
return AudioSystem::getOutput(mStreamType,
- mCblk->sampleRate, mFormat, mChannelMask, (audio_policy_output_flags_t)mFlags);
+ mCblk->sampleRate, mFormat, mChannelMask, mFlags);
}
int AudioTrack::getSessionId() const
@@ -734,7 +735,7 @@ status_t AudioTrack::createTrack_l(
audio_format_t format,
uint32_t channelMask,
int frameCount,
- uint32_t flags,
+ audio_policy_output_flags_t flags,
const sp<IMemory>& sharedBuffer,
audio_io_handle_t output,
bool enforceFrameCount)
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index ebadbfa..47c261d 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -362,7 +362,7 @@ public:
audio_format_t *pFormat,
uint32_t *pChannels,
uint32_t *pLatencyMs,
- uint32_t flags)
+ audio_policy_output_flags_t flags)
{
Parcel data, reply;
uint32_t devices = pDevices ? *pDevices : 0;
@@ -377,7 +377,7 @@ public:
data.writeInt32(format);
data.writeInt32(channels);
data.writeInt32(latency);
- data.writeInt32(flags);
+ data.writeInt32((int32_t) flags);
remote()->transact(OPEN_OUTPUT, data, &reply);
audio_io_handle_t output = (audio_io_handle_t) reply.readInt32();
ALOGV("openOutput() returned output, %d", output);
@@ -845,7 +845,7 @@ status_t BnAudioFlinger::onTransact(
audio_format_t format = (audio_format_t) data.readInt32();
uint32_t channels = data.readInt32();
uint32_t latency = data.readInt32();
- uint32_t flags = data.readInt32();
+ audio_policy_output_flags_t flags = (audio_policy_output_flags_t) data.readInt32();
audio_io_handle_t output = openOutput(&devices,
&samplingRate,
&format,
diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp
index 6cb5b82..a85956c 100644
--- a/media/libmedia/JetPlayer.cpp
+++ b/media/libmedia/JetPlayer.cpp
@@ -94,7 +94,7 @@ int JetPlayer::init()
AUDIO_FORMAT_PCM_16_BIT,
(pLibConfig->numChannels == 2) ? AUDIO_CHANNEL_OUT_STEREO : AUDIO_CHANNEL_OUT_MONO,
mTrackBufferSize,
- 0);
+ AUDIO_POLICY_OUTPUT_FLAG_NONE);
// create render and playback thread
{
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 54eb98a..9c3170c 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -1024,7 +1024,7 @@ bool ToneGenerator::initAudioTrack() {
AUDIO_FORMAT_PCM_16_BIT,
AUDIO_CHANNEL_OUT_MONO,
0,
- 0,
+ AUDIO_POLICY_OUTPUT_FLAG_NONE,
audioCallback,
this,
0,
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 1a85c9c..bbc53f3 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -1503,7 +1503,7 @@ status_t MediaPlayerService::AudioOutput::open(
format,
channelMask,
frameCount,
- 0 /* flags */,
+ AUDIO_POLICY_OUTPUT_FLAG_NONE,
CallbackWrapper,
this,
0,
@@ -1515,7 +1515,7 @@ status_t MediaPlayerService::AudioOutput::open(
format,
channelMask,
frameCount,
- 0,
+ AUDIO_POLICY_OUTPUT_FLAG_NONE,
NULL,
NULL,
0,
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 2b3cb1a..23c3c74 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -151,7 +151,7 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
mAudioTrack = new AudioTrack(
AUDIO_STREAM_MUSIC, mSampleRate, AUDIO_FORMAT_PCM_16_BIT, audioMask,
- 0, 0, &AudioCallback, this, 0);
+ 0, AUDIO_POLICY_OUTPUT_FLAG_NONE, &AudioCallback, this, 0);
if ((err = mAudioTrack->initCheck()) != OK) {
delete mAudioTrack;