audio_format_t format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
int frameCount = 0,
- uint32_t flags = 0,
+ audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
void* user = NULL,
int notificationFrames = 0,
int format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
int frameCount = 0,
- uint32_t flags = 0,
+ uint32_t flags = (uint32_t) AUDIO_POLICY_OUTPUT_FLAG_NONE,
callback_t cbf = 0,
void* user = 0,
int notificationFrames = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
const sp<IMemory>& sharedBuffer = 0,
- uint32_t flags = 0,
+ audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
void* user = NULL,
int notificationFrames = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
int frameCount = 0,
- uint32_t flags = 0,
+ audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
void* user = NULL,
int notificationFrames = 0,
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);
uint32_t mNewPosition;
uint32_t mUpdatePeriod;
bool mFlushed; // FIXME will be made obsolete by making flush() synchronous
- uint32_t mFlags;
+ audio_policy_output_flags_t mFlags;
int mSessionId;
int mAuxEffectId;
mutable Mutex mLock;
#include <media/IAudioRecord.h>
#include <media/IAudioFlingerClient.h>
#include <system/audio.h>
+#include <system/audio_policy.h>
#include <hardware/audio_effect.h>
#include <media/IEffect.h>
#include <media/IEffectClient.h>
audio_format_t *pFormat,
uint32_t *pChannels,
uint32_t *pLatencyMs,
- uint32_t flags) = 0;
+ audio_policy_output_flags_t flags) = 0;
virtual audio_io_handle_t openDuplicateOutput(audio_io_handle_t output1,
audio_io_handle_t output2) = 0;
virtual status_t closeOutput(audio_io_handle_t output) = 0;
audio_format_t format,
int channelMask,
int frameCount,
- uint32_t flags,
+ audio_policy_output_flags_t flags,
callback_t cbf,
void* user,
int notificationFrames,
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);
}
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,
audio_format_t format,
int channelMask,
int frameCount,
- uint32_t flags,
+ audio_policy_output_flags_t flags,
callback_t cbf,
void* user,
int notificationFrames,
// 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)) {
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);
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
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)
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;
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);
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,
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
{
AUDIO_FORMAT_PCM_16_BIT,
AUDIO_CHANNEL_OUT_MONO,
0,
- 0,
+ AUDIO_POLICY_OUTPUT_FLAG_NONE,
audioCallback,
this,
0,
format,
channelMask,
frameCount,
- 0 /* flags */,
+ AUDIO_POLICY_OUTPUT_FLAG_NONE,
CallbackWrapper,
this,
0,
format,
channelMask,
frameCount,
- 0,
+ AUDIO_POLICY_OUTPUT_FLAG_NONE,
NULL,
NULL,
0,
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;
audio_format_t *pFormat,
uint32_t *pChannels,
uint32_t *pLatencyMs,
- uint32_t flags)
+ audio_policy_output_flags_t flags)
{
status_t status;
PlaybackThread *thread = NULL;
audio_format_t *pFormat,
uint32_t *pChannels,
uint32_t *pLatencyMs,
- uint32_t flags);
+ audio_policy_output_flags_t flags);
virtual audio_io_handle_t openDuplicateOutput(audio_io_handle_t output1,
audio_io_handle_t output2);