Home
last modified time | relevance | path

Searched refs:oboe (Results 1 – 25 of 228) sorted by relevance

12345678910

/external/skia/third_party/oboe/
DBUILD.gn13 third_party("oboe") {
17 "../externals/oboe/include",
18 "../externals/oboe/samples/parselib/src/main/cpp",
19 "../externals/oboe/src/flowgraph",
21 include_dirs = [ "../externals/oboe/src" ]
24 "../externals/oboe/samples/parselib/src/main/cpp/stream/FileInputStream.cpp",
25 "../externals/oboe/samples/parselib/src/main/cpp/stream/InputStream.cpp",
26 "../externals/oboe/samples/parselib/src/main/cpp/stream/MemInputStream.cpp",
27 "../externals/oboe/samples/parselib/src/main/cpp/wav/AudioEncoding.cpp",
28 "../externals/oboe/samples/parselib/src/main/cpp/wav/WavChunkHeader.cpp",
[all …]
/external/oboe/samples/LiveEffect/src/main/cpp/
DLiveEffectEngine.h26 class LiveEffectEngine : public oboe::AudioStreamCallback {
42 oboe::DataCallbackResult onAudioReady(oboe::AudioStream *oboeStream,
48 void onErrorBeforeClose(oboe::AudioStream *oboeStream, oboe::Result error) override;
49 void onErrorAfterClose(oboe::AudioStream *oboeStream, oboe::Result error) override;
51 bool setAudioApi(oboe::AudioApi);
57 int32_t mRecordingDeviceId = oboe::kUnspecified;
58 int32_t mPlaybackDeviceId = oboe::kUnspecified;
59 const oboe::AudioFormat mFormat = oboe::AudioFormat::Float; // for easier processing
60 oboe::AudioApi mAudioApi = oboe::AudioApi::AAudio;
61 int32_t mSampleRate = oboe::kUnspecified;
[all …]
DLiveEffectEngine.cpp35 oboe::AudioStreamBuilder builder; in isAAudioSupported()
39 bool LiveEffectEngine::setAudioApi(oboe::AudioApi api) { in setAudioApi()
50 success = openStreams() == oboe::Result::OK; in setEffectOn()
80 oboe::Result LiveEffectEngine::openStreams() { in openStreams()
85 oboe::AudioStreamBuilder inBuilder, outBuilder; in openStreams()
87 oboe::Result result = outBuilder.openStream(mPlayStream); in openStreams()
88 if (result != oboe::Result::OK) { in openStreams()
89 mSampleRate = oboe::kUnspecified; in openStreams()
99 if (result != oboe::Result::OK) { in openStreams()
118 oboe::AudioStreamBuilder *LiveEffectEngine::setupRecordingStreamParameters( in setupRecordingStreamParameters()
[all …]
DFullDuplexStream.cpp19 oboe::DataCallbackResult FullDuplexStream::onAudioReady( in onAudioReady()
20 oboe::AudioStream *outputStream, in onAudioReady()
23 oboe::DataCallbackResult callbackResult = oboe::DataCallbackResult::Continue; in onAudioReady()
34 oboe::ResultWithValue<int32_t> result = mInputStream->read(mInputBuffer.get(), in onAudioReady()
55 oboe::ResultWithValue<int32_t> result = mInputStream->read(mInputBuffer.get(), in onAudioReady()
59 callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
65 oboe::ResultWithValue<int32_t> result = mInputStream->read(mInputBuffer.get(), in onAudioReady()
69 callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
80 if (callbackResult == oboe::DataCallbackResult::Stop) { in onAudioReady()
87 oboe::Result FullDuplexStream::start() { in start()
[all …]
DFullDuplexStream.h25 class FullDuplexStream : public oboe::AudioStreamCallback {
30 void setInputStream(std::shared_ptr<oboe::AudioStream> stream) { in setInputStream()
34 void setOutputStream(std::shared_ptr<oboe::AudioStream> stream) { in setOutputStream()
38 virtual oboe::Result start();
40 virtual oboe::Result stop();
46 virtual oboe::DataCallbackResult onBothStreamsReady(
47 std::shared_ptr<oboe::AudioStream> inputStream,
50 std::shared_ptr<oboe::AudioStream> outputStream,
59 oboe::DataCallbackResult onAudioReady(
60 oboe::AudioStream *audioStream,
[all …]
/external/oboe/apps/OboeTester/app/src/main/cpp/
DNativeAudioContext.cpp26 using namespace oboe;
28 static oboe::AudioApi convertNativeApiToAudioApi(int nativeApi) { in convertNativeApiToAudioApi()
32 return oboe::AudioApi::Unspecified; in convertNativeApiToAudioApi()
34 return oboe::AudioApi::AAudio; in convertNativeApiToAudioApi()
36 return oboe::AudioApi::OpenSLES; in convertNativeApiToAudioApi()
61 std::shared_ptr<oboe::AudioStream> ActivityContext::getOutputStream() { in getOutputStream()
63 std::shared_ptr<oboe::AudioStream> oboeStream = entry.second; in getOutputStream()
64 if (oboeStream->getDirection() == oboe::Direction::Output) { in getOutputStream()
71 std::shared_ptr<oboe::AudioStream> ActivityContext::getInputStream() { in getInputStream()
73 std::shared_ptr<oboe::AudioStream> oboeStream = entry.second; in getInputStream()
[all …]
DFullDuplexStream.cpp20 oboe::DataCallbackResult FullDuplexStream::onAudioReady( in onAudioReady()
21 oboe::AudioStream *outputStream, in onAudioReady()
24 oboe::DataCallbackResult callbackResult = oboe::DataCallbackResult::Continue; in onAudioReady()
35 oboe::ResultWithValue<int32_t> result = getInputStream()->read(mInputBuffer.get(), in onAudioReady()
57 oboe::ResultWithValue<int32_t> resultAvailable = getInputStream()->getAvailableFrames(); in onAudioReady()
61 callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
65oboe::ResultWithValue<int32_t> resultRead = getInputStream()->read(mInputBuffer.get(), numFrames, … in onAudioReady()
68 callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
74 oboe::ResultWithValue<int32_t> resultAvailable = getInputStream()->getAvailableFrames(); in onAudioReady()
77 callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
[all …]
DNativeAudioContext.h82 std::shared_ptr<oboe::AudioStream> getStream(int32_t streamIndex) { in getStream()
91 virtual void configureBuilder(bool isInput, oboe::AudioStreamBuilder &builder);
132 oboe::Result start();
134 oboe::Result pause();
136 oboe::Result stopAllStreams();
138 virtual oboe::Result stop() { in stop()
150 virtual oboe::Result startPlayback() { in startPlayback()
151 return oboe::Result::OK; in startPlayback()
154 virtual oboe::Result stopPlayback() { in stopPlayback()
155 return oboe::Result::OK; in stopPlayback()
[all …]
DFullDuplexStream.h25 class FullDuplexStream : public oboe::AudioStreamCallback {
30 void setInputStream(oboe::AudioStream *stream) { in setInputStream()
34 oboe::AudioStream *getInputStream() { in getInputStream()
38 void setOutputStream(oboe::AudioStream *stream) { in setOutputStream()
41 oboe::AudioStream *getOutputStream() { in getOutputStream()
45 virtual oboe::Result start();
47 virtual oboe::Result stop();
53 virtual oboe::DataCallbackResult onBothStreamsReady(
63 oboe::DataCallbackResult onAudioReady(
64 oboe::AudioStream *audioStream,
[all …]
Djni-bridge.cpp92 return oboe::AAudioExtensions::getInstance().isMMapSupported(); in Java_com_google_sample_oboe_manualtest_NativeEngine_isMMapSupported()
97 return oboe::AAudioExtensions::getInstance().isMMapExclusiveSupported(); in Java_com_google_sample_oboe_manualtest_NativeEngine_isMMapExclusiveSupported()
103 oboe::OboeGlobals::setWorkaroundsEnabled(enabled); in Java_com_google_sample_oboe_manualtest_NativeEngine_setWorkaroundsEnabled()
109 return oboe::OboeGlobals::areWorkaroundsEnabled(); in Java_com_google_sample_oboe_manualtest_NativeEngine_areWorkaroundsEnabled()
182 …std::shared_ptr<oboe::AudioStream> oboeStream = engine.getCurrentActivity()->getStream(streamIndex… in Java_com_google_sample_oboe_manualtest_OboeAudioStream_setBufferSizeInFrames()
189 return (jint) oboe::Result::ErrorNull; in Java_com_google_sample_oboe_manualtest_OboeAudioStream_setBufferSizeInFrames()
195 jint result = (jint) oboe::Result::ErrorNull; in Java_com_google_sample_oboe_manualtest_OboeAudioStream_getBufferSizeInFrames()
196 …std::shared_ptr<oboe::AudioStream> oboeStream = engine.getCurrentActivity()->getStream(streamIndex… in Java_com_google_sample_oboe_manualtest_OboeAudioStream_getBufferSizeInFrames()
206 jint result = (jint) oboe::Result::ErrorNull; in Java_com_google_sample_oboe_manualtest_OboeAudioStream_getBufferCapacityInFrames()
207 …std::shared_ptr<oboe::AudioStream> oboeStream = engine.getCurrentActivity()->getStream(streamIndex… in Java_com_google_sample_oboe_manualtest_OboeAudioStream_getBufferCapacityInFrames()
[all …]
DInputStreamCallbackAnalyzer.cpp20 oboe::DataCallbackResult InputStreamCallbackAnalyzer::onAudioReady( in onAudioReady()
21 oboe::AudioStream *audioStream, in onAudioReady()
28 if (audioStream->getFormat() == oboe::AudioFormat::I16) { in onAudioReady()
41 } else if (audioStream->getFormat() == oboe::AudioFormat::Float) { in onAudioReady()
56 audioStream->waitForAvailableFrames(mMinimumFramesBeforeRead, oboe::kNanosPerSecond); in onAudioReady()
58 return oboe::DataCallbackResult::Continue; in onAudioReady()
DAudioStreamGateway.h26 using namespace oboe::flowgraph;
37 void setAudioSink(std::shared_ptr<oboe::flowgraph::FlowGraphSink> sink) { in setAudioSink()
44 oboe::DataCallbackResult onAudioReady(
45 oboe::AudioStream *audioStream,
51 std::shared_ptr<oboe::flowgraph::FlowGraphSink> mAudioSink;
/external/oboe/
Dprefab_build.sh12 major=$(grep "#define OBOE_VERSION_MAJOR" include/oboe/Version.h | cut -d' ' -f3)
13 minor=$(grep "#define OBOE_VERSION_MINOR" include/oboe/Version.h | cut -d' ' -f3)
14 patch=$(grep "#define OBOE_VERSION_PATCH" include/oboe/Version.h | cut -d' ' -f3)
31 mv oboe-VERSION oboe-$version
32 mv oboe-VERSION.pom oboe-$version.pom
33 sed -i '' -e "s/VERSION/${version}/g" oboe-$version.pom oboe-$version/prefab/prefab.json
36 cp -R ../../include oboe-$version/prefab/modules/oboe/
51 --output prefab-output-tmp $(pwd)/oboe-${version}/prefab
62 pushd oboe-${version}
63 zip -r oboe-${version}.aar . 2>/dev/null;
[all …]
/external/oboe/apps/fxlab/app/src/main/cpp/
DDuplexEngine.cpp27 if (inStream->getFormat() == oboe::AudioFormat::Float) { in beginStreams()
30 } else if (inStream->getFormat() == oboe::AudioFormat::I16) { in beginStreams()
38 oboe::Result result = startStreams(); in beginStreams()
39 if (result != oboe::Result::OK) stopStreams(); in beginStreams()
53 oboe::AudioStreamBuilder DuplexEngine::defaultBuilder() { in defaultBuilder()
54 return *oboe::AudioStreamBuilder() in defaultBuilder()
55 .setPerformanceMode(oboe::PerformanceMode::LowLatency) in defaultBuilder()
56 ->setSharingMode(oboe::SharingMode::Exclusive); in defaultBuilder()
60 defaultBuilder().setDirection(oboe::Direction::Input) in openInStream()
61 ->setFormat(oboe::AudioFormat::Float) // For now in openInStream()
[all …]
DDuplexCallback.h28 class DuplexCallback : public oboe::AudioStreamCallback {
31 DuplexCallback(oboe::AudioStream &inStream, in DuplexCallback()
37 oboe::DataCallbackResult
38 onAudioReady(oboe::AudioStream *outputStream, void *audioData, int32_t numFrames) override { in onAudioReady()
44 oboe::ResultWithValue<int32_t> result = inRef.read(inputBuffer.get(), numFrames, 0); in onAudioReady()
48 return oboe::DataCallbackResult::Stop; in onAudioReady()
52 return oboe::DataCallbackResult::Continue; in onAudioReady()
60 return oboe::DataCallbackResult::Continue; in onAudioReady()
63 void onErrorAfterClose(oboe::AudioStream *, oboe::Result result) override { in onErrorAfterClose()
65 if (result == oboe::Result::ErrorDisconnected) { in onErrorAfterClose()
[all …]
DDuplexEngine.h37 oboe::Result startStreams();
39 oboe::Result stopStreams();
51 static oboe::AudioStreamBuilder defaultBuilder();
56 oboe::ManagedStream inStream;
57 std::unique_ptr<oboe::AudioStreamCallback> mCallback;
58 oboe::ManagedStream outStream;
/external/oboe/samples/hello-oboe/src/main/cpp/
DHelloOboeEngine.cpp52 if (result == oboe::Result::OK) { in getCurrentOutputLatencyMillis()
53 oboe::FrameTimestamp playedFrame = result.value(); in getCurrentOutputLatencyMillis()
59 … int64_t frameTimeDelta = (frameIndexDelta * oboe::kNanosPerSecond) / (mStream->getSampleRate()); in getCurrentOutputLatencyMillis()
69 LOGE("Error calculating latency: %s", oboe::convertToText(result.error())); in getCurrentOutputLatencyMillis()
88 void HelloOboeEngine::setAudioApi(oboe::AudioApi audioApi) { in setAudioApi()
100 if (reopenStream() != oboe::Result::OK) { in setDeviceId()
102 mDeviceId = oboe::Unspecified; in setDeviceId()
114 oboe::Result HelloOboeEngine::createPlaybackStream() { in createPlaybackStream()
115 oboe::AudioStreamBuilder builder; in createPlaybackStream()
116 return builder.setSharingMode(oboe::SharingMode::Exclusive) in createPlaybackStream()
[all …]
DHelloOboeEngine.h42 oboe::Result start();
66 void setAudioApi(oboe::AudioApi audioApi);
90 oboe::Result reopenStream();
91 oboe::Result createPlaybackStream();
93 std::shared_ptr<oboe::AudioStream> mStream;
99 int32_t mDeviceId = oboe::Unspecified;
100 int32_t mChannelCount = oboe::Unspecified;
101 oboe::AudioApi mAudioApi = oboe::AudioApi::Unspecified;
/external/oboe/docs/
DGettingStarted.md12 … via [Google Maven](https://maven.google.com/web/index.html) (search for "oboe"). [Prefab support …
14 Add the oboe dependency to your app's `build.gradle` file. Replace "1.4.3" with the [latest stable …
17 implementation 'com.google.oboe:oboe:1.4.3'
28 Include and link to oboe by updating your `CMakeLists.txt`:
30 find_package (oboe REQUIRED CONFIG)
31 target_link_libraries(app oboe::oboe) # You may have other libraries here such as `log`.
41 find_package (oboe REQUIRED CONFIG)
44 target_link_libraries(app log oboe::oboe)
61 Start by cloning the [latest stable release](https://github.com/google/oboe/releases/) of the Oboe …
63 git clone -b 1.4-stable https://github.com/google/oboe
[all …]
DChangeLog.md3 **This changelog is deprecated**. See the [Oboe releases page](https://github.com/google/oboe/relea…
5 ## [1.0.0](https://github.com/google/oboe/releases/tag/1.0.0)
10 - [Remove `AudioStream::setNativeFormat`](https://github.com/google/oboe/pull/213/commits/0e8af6a65…
11 - [Remove `AudioStream::isPlaying`](https://github.com/google/oboe/pull/213/commits/6437f5aa224330f…
12 - [Add `AudioStream::getTimestamp(clockid_t)`](https://github.com/google/oboe/pull/213/commits/ab69…
14 - [Add Android P functions](https://github.com/google/oboe/commit/c30bbe603c256f92cdf2876c3122bc5be…
17 - Add [API reference](https://google.github.io/oboe/)
22 …es to `ResultWithValue` where appropriate. [Full details](https://github.com/google/oboe/pull/109).
/external/oboe/src/common/
DAudioStreamBuilder.cpp31 bool oboe::OboeGlobals::mWorkaroundsEnabled = true;
33 namespace oboe { namespace
75 if (getDirection() == oboe::Direction::Output) { in build()
77 } else if (getDirection() == oboe::Direction::Input) { in build()
85 return (getSampleRate() == oboe::Unspecified || getSampleRate() == other.getSampleRate()) in isCompatible()
86 && (getFormat() == (AudioFormat)oboe::Unspecified || getFormat() == other.getFormat()) in isCompatible()
87 …&& (getFramesPerDataCallback() == oboe::Unspecified || getFramesPerDataCallback() == other.getFram… in isCompatible()
88 … && (getChannelCount() == oboe::Unspecified || getChannelCount() == other.getChannelCount()); in isCompatible()
126 if (getFormat() == oboe::AudioFormat::Unspecified) { in openStream()
129 if (getChannelCount() == oboe::Unspecified) { in openStream()
[all …]
/external/oboe/samples/iolib/src/main/cpp/player/
DSimpleMultiPlayer.h34 class SimpleMultiPlayer : public oboe::AudioStreamCallback {
39 oboe::DataCallbackResult onAudioReady(oboe::AudioStream *oboeStream, void *audioData,
41 virtual void onErrorAfterClose(oboe::AudioStream *oboeStream, oboe::Result error) override;
42 virtual void onErrorBeforeClose(oboe::AudioStream * oboeStream, oboe::Result error) override;
81 std::shared_ptr<oboe::AudioStream> mAudioStream;
/external/skia/modules/audioplayer/
DSkAudioPlayer_oboe.cpp17 class OboeAudioPlayer final : public SkAudioPlayer, oboe::AudioStreamCallback {
30 oboe::AudioStreamBuilder builder; in OboeAudioPlayer()
31 builder.setPerformanceMode(oboe::PerformanceMode::LowLatency); in OboeAudioPlayer()
32 builder.setSharingMode(oboe::SharingMode::Exclusive); in OboeAudioPlayer()
36 builder.setFormat(oboe::AudioFormat::Float); in OboeAudioPlayer()
44 oboe::DataCallbackResult
45 onAudioReady(oboe::AudioStream *oboeStream, void *audioData, int32_t numFrames) override { in onAudioReady()
61 return oboe::DataCallbackResult::Stop; in onAudioReady()
64 return oboe::DataCallbackResult::Continue; in onAudioReady()
107 std::shared_ptr<oboe::AudioStream> fStream;
/external/oboe/include/oboe/
DResultWithValue.h24 namespace oboe {
55 ResultWithValue(oboe::Result error) in ResultWithValue()
66 , mError(oboe::Result::OK) {} in ResultWithValue()
73 oboe::Result error() const { in error()
88 explicit operator bool() const { return mError == oboe::Result::OK; }
100 bool operator !() const { return mError != oboe::Result::OK; }
136 const oboe::Result mError;
/external/oboe/samples/shared/
DDefaultErrorCallback.h34 class DefaultErrorCallback : public oboe::AudioStreamErrorCallback {
40 virtual void onErrorAfterClose(oboe::AudioStream *oboeStream, oboe::Result error) override { in onErrorAfterClose()
43 if (error == oboe::Result::ErrorDisconnected) { in onErrorAfterClose()
47 LOGE("Error was %s", oboe::convertToText(error)); in onErrorAfterClose()

12345678910