Browse Source

Whitespace

tags/2021-05-28
jules 6 years ago
parent
commit
e19c673b4e
1 changed files with 20 additions and 20 deletions
  1. +20
    -20
      modules/juce_audio_devices/native/juce_android_Oboe.cpp

+ 20
- 20
modules/juce_audio_devices/native/juce_android_Oboe.cpp View File

@@ -124,12 +124,12 @@ struct OboeAudioIODeviceBufferHelpers<float>
} }
} }
}; };
template <typename Type>
static String getOboeString (const Type& value)
{
return String (oboe::convertToText (value));
}
template <typename Type>
static String getOboeString (const Type& value)
{
return String (oboe::convertToText (value));
}
//============================================================================== //==============================================================================
class OboeAudioIODevice : public AudioIODevice class OboeAudioIODevice : public AudioIODevice
@@ -466,7 +466,7 @@ private:
auto startResult = stream->requestStart(); auto startResult = stream->requestStart();
JUCE_OBOE_LOG ("Requested Oboe stream start with result: " + getOboeString (startResult)); JUCE_OBOE_LOG ("Requested Oboe stream start with result: " + getOboeString (startResult));
startResult = stream->waitForStateChange (expectedState, &nextState, timeoutNanos);
startResult = stream->waitForStateChange (expectedState, &nextState, timeoutNanos);
JUCE_OBOE_LOG ("Starting Oboe stream with result: " + getOboeString (startResult); JUCE_OBOE_LOG ("Starting Oboe stream with result: " + getOboeString (startResult);
+ "\nUses AAudio = " + String ((int) stream->usesAAudio()) + "\nUses AAudio = " + String ((int) stream->usesAAudio())
@@ -494,17 +494,17 @@ private:
int getXRunCount() const int getXRunCount() const
{ {
if (stream != nullptr)
if (stream != nullptr)
{ {
auto count = stream->getXRunCount();
auto count = stream->getXRunCount();
if (count) if (count)
return count.value();

JUCE_OBOE_LOG ("Failed to get Xrun count: " + getOboeString (count.error()));
}
return count.value();
return 0;
JUCE_OBOE_LOG ("Failed to get Xrun count: " + getOboeString (count.error()));
}
return 0;
} }
private: private:
@@ -1148,7 +1148,7 @@ public:
int getIndexOfDevice (AudioIODevice* device, bool asInput) const override int getIndexOfDevice (AudioIODevice* device, bool asInput) const override
{ {
if (auto oboeDevice = static_cast<OboeAudioIODevice*> (device))
if (auto oboeDevice = static_cast<OboeAudioIODevice*> (device))
{ {
auto oboeDeviceId = asInput ? oboeDevice->inputDeviceId auto oboeDeviceId = asInput ? oboeDevice->inputDeviceId
: oboeDevice->outputDeviceId; : oboeDevice->outputDeviceId;
@@ -1157,7 +1157,7 @@ public:
for (int i = 0; i < devices.size(); ++i) for (int i = 0; i < devices.size(); ++i)
if (devices.getReference (i).id == oboeDeviceId) if (devices.getReference (i).id == oboeDeviceId)
return i;
return i;
} }
return -1; return -1;
@@ -1471,14 +1471,14 @@ public:
{ {
JUCE_OBOE_LOG ("OboeRealtimeThread: Oboe stream onErrorBeforeClose(): " + getOboeString (error)); JUCE_OBOE_LOG ("OboeRealtimeThread: Oboe stream onErrorBeforeClose(): " + getOboeString (error));
ignoreUnused (error); ignoreUnused (error);
jassertfalse; // Should never get here!
jassertfalse; // Should never get here!
} }
void onErrorAfterClose (oboe::AudioStream*, oboe::Result error) override void onErrorAfterClose (oboe::AudioStream*, oboe::Result error) override
{ {
JUCE_OBOE_LOG ("OboeRealtimeThread: Oboe stream onErrorAfterClose(): " + getOboeString (error)); JUCE_OBOE_LOG ("OboeRealtimeThread: Oboe stream onErrorAfterClose(): " + getOboeString (error));
ignoreUnused (error); ignoreUnused (error);
jassertfalse; // Should never get here!
jassertfalse; // Should never get here!
} }
private: private:
@@ -1502,7 +1502,7 @@ pthread_t juce_createRealtimeAudioThread (void* (*entry) (void*), void* userPtr)
return {}; return {};
auto threadID = thread->startThread (entry, userPtr); auto threadID = thread->startThread (entry, userPtr);
thread.release(); // the thread will de-allocate itself
thread.release(); // the thread will de-allocate itself
return threadID; return threadID;
} }


Loading…
Cancel
Save