Home
last modified time | relevance | path

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

123456789

/third_party/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 …]
/third_party/skia/third_party/externals/oboe/samples/LiveEffect/src/main/cpp/
DLiveEffectEngine.cpp42 oboe::AudioStreamBuilder builder; in isAAudioSupported()
46 bool LiveEffectEngine::setAudioApi(oboe::AudioApi api) { in setAudioApi()
57 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()
98 if (result != oboe::Result::OK) { in openStreams()
116 oboe::AudioStreamBuilder *LiveEffectEngine::setupRecordingStreamParameters( in setupRecordingStreamParameters()
[all …]
DLiveEffectEngine.h26 class LiveEffectEngine : public oboe::AudioStreamCallback {
41 oboe::DataCallbackResult onAudioReady(oboe::AudioStream *oboeStream,
43 void onErrorBeforeClose(oboe::AudioStream *oboeStream, oboe::Result error) override;
44 void onErrorAfterClose(oboe::AudioStream *oboeStream, oboe::Result error) override;
46 bool setAudioApi(oboe::AudioApi);
52 int32_t mRecordingDeviceId = oboe::kUnspecified;
53 int32_t mPlaybackDeviceId = oboe::kUnspecified;
54 oboe::AudioFormat mFormat = oboe::AudioFormat::I16;
55 int32_t mSampleRate = oboe::kUnspecified;
56 int32_t mInputChannelCount = oboe::ChannelCount::Stereo;
[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 = getInputStream()->read(mInputBuffer.get(), in onAudioReady()
55 oboe::ResultWithValue<int32_t> result = getInputStream()->read(mInputBuffer.get(), in onAudioReady()
59 callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
65 oboe::ResultWithValue<int32_t> result = getInputStream()->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(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(
64 oboe::DataCallbackResult onAudioReady(
65 oboe::AudioStream *audioStream,
[all …]
/third_party/skia/third_party/externals/oboe/apps/OboeTester/app/src/main/cpp/
DNativeAudioContext.cpp25 using namespace oboe;
27 static oboe::AudioApi convertNativeApiToAudioApi(int nativeApi) { in convertNativeApiToAudioApi()
31 return oboe::AudioApi::Unspecified; in convertNativeApiToAudioApi()
33 return oboe::AudioApi::AAudio; in convertNativeApiToAudioApi()
35 return oboe::AudioApi::OpenSLES; in convertNativeApiToAudioApi()
60 oboe::AudioStream * ActivityContext::getOutputStream() { in getOutputStream()
62 oboe::AudioStream *oboeStream = entry.second.get(); in getOutputStream()
63 if (oboeStream->getDirection() == oboe::Direction::Output) { in getOutputStream()
70 oboe::AudioStream * ActivityContext::getInputStream() { in getInputStream()
72 oboe::AudioStream *oboeStream = entry.second.get(); 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.h99 bool isMMapUsed(oboe::AudioStream *oboeStream) { in isMMapUsed()
197 oboe::AudioStream *getStream(int32_t streamIndex) { in getStream()
206 virtual void configureBuilder(bool isInput, oboe::AudioStreamBuilder &builder);
229 oboe::Result start();
231 oboe::Result pause();
233 oboe::Result stopAllStreams();
235 virtual oboe::Result stop() { in stop()
247 virtual oboe::Result startPlayback() { in startPlayback()
248 return oboe::Result::OK; in startPlayback()
251 virtual oboe::Result stopPlayback() { in stopPlayback()
[all …]
Djni-bridge.cpp103 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 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 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 oboe::AudioStream *oboeStream = engine.getCurrentActivity()->getStream(streamIndex); in Java_com_google_sample_oboe_manualtest_OboeAudioStream_getBufferCapacityInFrames()
214 static int convertAudioApiToNativeApi(oboe::AudioApi audioApi) { in convertAudioApiToNativeApi()
216 case oboe::AudioApi::Unspecified: in convertAudioApiToNativeApi()
[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 …]
DOboeStreamCallbackProxy.h25 class OboeStreamCallbackProxy : public oboe::AudioStreamCallback {
28 void setCallback(oboe::AudioStreamCallback *callback) { in setCallback()
52 oboe::DataCallbackResult onAudioReady(
53 oboe::AudioStream *audioStream,
57 void onErrorBeforeClose(oboe::AudioStream *audioStream, oboe::Result error) override;
59 void onErrorAfterClose(oboe::AudioStream *audioStream, oboe::Result error) override;
85 oboe::AudioStreamCallback *mCallback = nullptr;
DOboeStreamCallbackProxy.cpp54 oboe::DataCallbackResult OboeStreamCallbackProxy::onAudioReady( in onAudioReady()
55 oboe::AudioStream *audioStream, in onAudioReady()
58 oboe::DataCallbackResult callbackResult = oboe::DataCallbackResult::Stop; in onAudioReady()
65 return oboe::DataCallbackResult::Stop; in onAudioReady()
83 void OboeStreamCallbackProxy::onErrorBeforeClose(oboe::AudioStream *audioStream, oboe::Result error… in onErrorBeforeClose()
90 void OboeStreamCallbackProxy::onErrorAfterClose(oboe::AudioStream *audioStream, oboe::Result error… in onErrorAfterClose()
/third_party/skia/third_party/externals/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;
/third_party/skia/third_party/externals/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 …]
/third_party/skia/third_party/externals/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()
89 void HelloOboeEngine::setAudioApi(oboe::AudioApi audioApi) { in setAudioApi()
104 if (reopenStream() != oboe::Result::OK) { in setDeviceId()
106 mDeviceId = oboe::Unspecified; in setDeviceId()
118 oboe::Result HelloOboeEngine::createPlaybackStream() { in createPlaybackStream()
119 oboe::AudioStreamBuilder builder; in createPlaybackStream()
120 return builder.setSharingMode(oboe::SharingMode::Exclusive) in createPlaybackStream()
[all …]
DHelloOboeEngine.h54 void setAudioApi(oboe::AudioApi audioApi);
78 oboe::Result reopenStream();
79 oboe::Result createPlaybackStream();
81 oboe::Result start();
83 std::shared_ptr<oboe::AudioStream> mStream;
88 int32_t mDeviceId = oboe::Unspecified;
89 int32_t mChannelCount = oboe::Unspecified;
90 oboe::AudioApi mAudioApi = oboe::AudioApi::Unspecified;
/third_party/skia/third_party/externals/oboe/docs/
DGettingStarted.md13 … via [Google Maven](https://maven.google.com/web/index.html) (search for "oboe"). [Prefab support …
15 Add the oboe dependency to your app's `build.gradle` file. Replace "1.4.3" with the [latest stable …
18 implementation 'com.google.oboe:oboe:1.4.3'
29 Include and link to oboe by updating your `CMakeLists.txt`:
31 find_package (oboe REQUIRED CONFIG)
32 target_link_libraries(app oboe::oboe) # You may have other libraries here such as `log`.
49 Start by cloning the [latest stable release](https://github.com/google/oboe/releases/) of the Oboe …
51 git clone -b 1.4-stable https://github.com/google/oboe
53 **Make a note of the path which you cloned oboe into - you will need it shortly**
59 git submodule add 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).
/third_party/skia/third_party/externals/oboe/src/common/
DAudioStreamBuilder.cpp29 bool oboe::OboeGlobals::mWorkaroundsEnabled = true;
31 namespace oboe { namespace
73 if (getDirection() == oboe::Direction::Output) { in build()
75 } else if (getDirection() == oboe::Direction::Input) { in build()
83 return (getSampleRate() == oboe::Unspecified || getSampleRate() == other.getSampleRate()) in isCompatible()
84 && (getFormat() == (AudioFormat)oboe::Unspecified || getFormat() == other.getFormat()) in isCompatible()
85 …&& (getFramesPerCallback() == oboe::Unspecified || getFramesPerCallback() == other.getFramesPerCal… in isCompatible()
86 … && (getChannelCount() == oboe::Unspecified || getChannelCount() == other.getChannelCount()); in isCompatible()
125 if (getFormat() == oboe::AudioFormat::Unspecified) { in openStream()
128 if (getChannelCount() == oboe::Unspecified) { in openStream()
[all …]
/third_party/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;
/third_party/skia/third_party/externals/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;
/third_party/skia/third_party/externals/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;
/third_party/skia/third_party/externals/oboe/samples/shared/
DDefaultAudioStreamCallback.h35 class DefaultAudioStreamCallback : public oboe::AudioStreamCallback {
40 virtual oboe::DataCallbackResult
41 onAudioReady(oboe::AudioStream *oboeStream, void *audioData, int32_t numFrames) override { in onAudioReady()
53 return oboe::DataCallbackResult::Stop; in onAudioReady()
56 return oboe::DataCallbackResult::Continue; in onAudioReady()
59 virtual void onErrorAfterClose(oboe::AudioStream *oboeStream, oboe::Result error) override { in onErrorAfterClose()
61 if (error == oboe::Result::ErrorDisconnected) { in onErrorAfterClose()

123456789