Lines Matching defs:outputDesc
436 AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
437 outputDesc->mDevice = mTestDevice;
438 outputDesc->mSamplingRate = mTestSamplingRate;
439 outputDesc->mFormat = mTestFormat;
440 outputDesc->mChannels = mTestChannels;
441 outputDesc->mLatency = mTestLatencyMs;
442 outputDesc->mFlags = (AudioSystem::output_flags)(mDirectOutput ? AudioSystem::OUTPUT_FLAG_DIRECT : 0);
443 outputDesc->mRefCount[stream] = 0;
444 mTestOutputs[mCurOutput] = mpClientInterface->openOutput(&outputDesc->mDevice,
445 &outputDesc->mSamplingRate,
446 &outputDesc->mFormat,
447 &outputDesc->mChannels,
448 &outputDesc->mLatency,
449 outputDesc->mFlags);
454 addOutput(mTestOutputs[mCurOutput], outputDesc);
465 AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
466 outputDesc->mDevice = device;
467 outputDesc->mSamplingRate = samplingRate;
468 outputDesc->mFormat = format;
469 outputDesc->mChannels = channels;
470 outputDesc->mLatency = 0;
471 outputDesc->mFlags = (AudioSystem::output_flags)(flags | AudioSystem::OUTPUT_FLAG_DIRECT);
472 outputDesc->mRefCount[stream] = 0;
473 output = mpClientInterface->openOutput(&outputDesc->mDevice,
474 &outputDesc->mSamplingRate,
475 &outputDesc->mFormat,
476 &outputDesc->mChannels,
477 &outputDesc->mLatency,
478 outputDesc->mFlags);
482 (samplingRate != 0 && samplingRate != outputDesc->mSamplingRate) ||
483 (format != 0 && format != outputDesc->mFormat) ||
484 (channels != 0 && channels != outputDesc->mChannels)) {
490 delete outputDesc;
493 addOutput(output, outputDesc);
550 AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
562 outputDesc->changeRefCount(stream, 1);
572 checkAndSetVolume(stream, mStreams[stream].mIndexCur, output, outputDesc->device());
586 AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
594 if (outputDesc->mRefCount[stream] > 0) {
596 outputDesc->changeRefCount(stream, -1);
631 AudioOutputDescriptor *outputDesc = mOutputs.valueAt(index);
632 if (outputDesc->refCount() == 0) {
926 AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
927 outputDesc->mDevice = (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER;
928 mHardwareOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
929 &outputDesc->mSamplingRate,
930 &outputDesc->mFormat,
931 &outputDesc->mChannels,
932 &outputDesc->mLatency,
933 outputDesc->mFlags);
937 outputDesc->mSamplingRate, outputDesc->mFormat, outputDesc->mChannels);
939 addOutput(mHardwareOutput, outputDesc);
1084 AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
1085 outputDesc->mDevice = (uint32_t)AudioSystem::DEVICE_OUT_SPEAKER;
1086 mHardwareOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
1087 &outputDesc->mSamplingRate,
1088 &outputDesc->mFormat,
1089 &outputDesc->mChannels,
1090 &outputDesc->mLatency,
1091 outputDesc->mFlags);
1094 outputDesc->mSamplingRate, outputDesc->mFormat, outputDesc->mChannels);
1099 addOutput(mHardwareOutput, outputDesc);
1131 void AudioPolicyManagerBase::addOutput(audio_io_handle_t id, AudioOutputDescriptor *outputDesc)
1133 outputDesc->mId = id;
1134 mOutputs.add(id, outputDesc);
1144 AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor();
1145 outputDesc->mDevice = device;
1146 mA2dpOutput = mpClientInterface->openOutput(&outputDesc->mDevice,
1147 &outputDesc->mSamplingRate,
1148 &outputDesc->mFormat,
1149 &outputDesc->mChannels,
1150 &outputDesc->mLatency,
1151 outputDesc->mFlags);
1154 addOutput(mA2dpOutput, outputDesc);
1174 dupOutputDesc->mSamplingRate = outputDesc->mSamplingRate;
1175 dupOutputDesc->mFormat = outputDesc->mFormat;
1176 dupOutputDesc->mChannels = outputDesc->mChannels;
1177 dupOutputDesc->mLatency = outputDesc->mLatency;
1187 delete outputDesc;
1192 delete outputDesc;
1348 AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
1359 outputDesc->isUsedByStrategy(STRATEGY_PHONE)) {
1361 } else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION)) {
1363 } else if (outputDesc->isUsedByStrategy(STRATEGY_MEDIA)) {
1365 } else if (outputDesc->isUsedByStrategy(STRATEGY_DTMF)) {
1543 AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
1546 if (outputDesc->isDuplicated()) {
1547 setOutputDevice(outputDesc->mOutput1->mId, device, force, delayMs);
1548 setOutputDevice(outputDesc->mOutput2->mId, device, force, delayMs);
1560 uint32_t prevDevice = (uint32_t)outputDesc->device();
1570 outputDesc->mDevice = device;
1575 usleep(outputDesc->mLatency*2*1000);
1658 AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
1662 device = outputDesc->device();
1684 if (outputDesc->mRefCount[AudioSystem::MUSIC] || mLimitRingtoneVolume) {
1763 AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
1765 LOGV("setStreamMute() stream %d, mute %d, output %d, mMuteCount %d", stream, on, output, outputDesc->mMuteCount[stream]);
1768 if (outputDesc->mMuteCount[stream] == 0) {
1770 checkAndSetVolume(stream, 0, output, outputDesc->device(), delayMs);
1774 outputDesc->mMuteCount[stream]++;
1776 if (outputDesc->mMuteCount[stream] == 0) {
1780 if (--outputDesc->mMuteCount[stream] == 0) {
1781 checkAndSetVolume(stream, streamDesc.mIndexCur, output, outputDesc->device(), delayMs);
1796 AudioOutputDescriptor *outputDesc = mOutputs.valueFor(mHardwareOutput);
1798 stream, starting, outputDesc->mDevice, stateChange);
1799 if (outputDesc->mRefCount[stream]) {
1802 muteCount = outputDesc->mRefCount[stream];
1811 if (outputDesc->device() & getDeviceForStrategy(STRATEGY_PHONE)) {