Skip to content

Commit

Permalink
Expecting use of exclusive AAudio mode is a bit extreme for MidiDevic…
Browse files Browse the repository at this point in the history
…eService.
  • Loading branch information
atsushieno committed Aug 7, 2024
1 parent 5ee63fa commit 80c38aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ aap::OboeAudioDevice::OboeAudioDevice(int32_t sampleRate, int32_t framesPerCallb
oboe::StabilizedCallback(this),
aap_buffer(numChannels, (int32_t) framesPerCallback) {
builder.setPerformanceMode(oboe::PerformanceMode::LowLatency)
->setSharingMode(oboe::SharingMode::Exclusive)
->setSharingMode(oboe::SharingMode::Shared)
->setFormatConversionAllowed(true)
->setFormat(oboe::AudioFormat::Float)
->setChannelConversionAllowed(true)
Expand All @@ -134,8 +134,6 @@ void aap::OboeAudioDevice::startCallback() {
throw std::runtime_error(std::string{"Failed to create Oboe stream: "} + oboe::convertToText(result));
if (!stream->usesAAudio())
aap::a_log(AAP_LOG_LEVEL_WARN, AAP_MANAGER_LOG_TAG, "AAudio is not enabled; anticipate audio output latency.");
if (stream->getSharingMode() != oboe::SharingMode::Exclusive)
aap::a_log(AAP_LOG_LEVEL_WARN, AAP_MANAGER_LOG_TAG, "AAudio is not in exclusive mode; anticipate audio output latency.");

result = stream->requestStart();
if (result != oboe::Result::OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int32_t AAPMidiProcessorOboePAL::setupStream() {

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

0 comments on commit 80c38aa

Please sign in to comment.