Skip to content

Commit 80c38aa

Browse files
committed
Expecting use of exclusive AAudio mode is a bit extreme for MidiDeviceService.
1 parent 5ee63fa commit 80c38aa

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

androidaudioplugin-manager/src/main/cpp/OboeAudioDeviceManager.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ aap::OboeAudioDevice::OboeAudioDevice(int32_t sampleRate, int32_t framesPerCallb
107107
oboe::StabilizedCallback(this),
108108
aap_buffer(numChannels, (int32_t) framesPerCallback) {
109109
builder.setPerformanceMode(oboe::PerformanceMode::LowLatency)
110-
->setSharingMode(oboe::SharingMode::Exclusive)
110+
->setSharingMode(oboe::SharingMode::Shared)
111111
->setFormatConversionAllowed(true)
112112
->setFormat(oboe::AudioFormat::Float)
113113
->setChannelConversionAllowed(true)
@@ -134,8 +134,6 @@ void aap::OboeAudioDevice::startCallback() {
134134
throw std::runtime_error(std::string{"Failed to create Oboe stream: "} + oboe::convertToText(result));
135135
if (!stream->usesAAudio())
136136
aap::a_log(AAP_LOG_LEVEL_WARN, AAP_MANAGER_LOG_TAG, "AAudio is not enabled; anticipate audio output latency.");
137-
if (stream->getSharingMode() != oboe::SharingMode::Exclusive)
138-
aap::a_log(AAP_LOG_LEVEL_WARN, AAP_MANAGER_LOG_TAG, "AAudio is not in exclusive mode; anticipate audio output latency.");
139137

140138
result = stream->requestStart();
141139
if (result != oboe::Result::OK)

androidaudioplugin-midi-device-service/src/main/cpp/AAPMidiProcessor_android.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int32_t AAPMidiProcessorOboePAL::setupStream() {
1111

1212
builder.setDirection(oboe::Direction::Output)
1313
->setPerformanceMode(oboe::PerformanceMode::LowLatency)
14-
->setSharingMode(oboe::SharingMode::Exclusive)
14+
->setSharingMode(oboe::SharingMode::Shared)
1515
->setFormat(oboe::AudioFormat::Float)
1616
->setChannelCount(owner->getChannelCount())
1717
// channels should be processed by plugin framework itself, but in case its output is mono

0 commit comments

Comments
 (0)