• Home
  • Raw
  • Download

Lines Matching +full:high +full:- +full:performance

2 Oboe is a C++ library which makes it easy to build high-performance audio apps on Android. Apps com…
6 …ams*, represented by the class `AudioStream`. The read/write calls can be blocking or non-blocking.
19 (a built-in mic or bluetooth headset) with the *Android device* (the phone or watch) that is runnin…
33 ![Oboe exclusive sharing mode diagram](images/oboe-sharing-mode-exclusive.jpg)
37 ![Oboe exclusive sharing mode diagram](images/oboe-sharing-mode-shared.jpg)
53 | :------------ | :---------- | :---- |
54 | I16 | int16_t | common 16-bit samples, [Q0.15 format](https://source.android.com/devices/audio/da…
55 | Float | float | -1.0 to +1.0 |
59 AudioFormat dataFormat = stream->getDataFormat();
146 general, the API should be chosen by Oboe to allow for best performance and
151 builder), since it depends on run-time behavior.
171 | :------------------------ | :----------------- |
182 | -- | `getFramesPerBurst()` |
195 * `setUsage(oboe::Usage usage)` - The purpose for creating the stream.
196 * `setContentType(oboe::ContentType contentType)` - The type of content carried
198 * `setInputPreset(oboe::InputPreset inputPreset)` - The recording configuration
200 * `setSessionId(SessionId sessionId)` - Allocate SessionID to connect to the
221 result = stream->requestStart();
222 result = stream->requestStop();
223 result = stream->requestPause();
224 result = stream->requestFlush();
241 ![Oboe Lifecycle](images/oboe-lifecycle.png)
254 the transient state Pausing, and arrive sometime later at the Paused state - though there's no guar…
262 result = stream->requestPause();
263 result = stream->waitForStateChange(inputState, &nextState, timeoutNanos);
285 The callback technique offers the lowest latency performance because the callback code can run in a…
289 …t and then just do a non-blocking read from the input stream. Then you have both the input and out…
296 …he specified number of frames, set timeoutNanos greater than zero. For a non-blocking call, set ti…
303 Result result = mStream->read(audioData, numFrames, timeout);
310 (numFrames - result) * mStream->getBytesPerFrame());
313 …ng the stream by writing data or silence into it. This must be done in a non-blocking call with ti…
315 The data in the buffer must match the data format returned by `mStream->getDataFormat()`.
321 stream->close();
341 * `onErrorBeforeClose(stream, error)` - called when the stream has been disconnected but not yet cl…
345 * `onErrorAfterClose(stream, error)` - called when the stream has been stopped and closed by Oboe s…
354 ## Optimizing performance
356 You can optimize the performance of an audio application by using special high-priority threads.
358 ### Using a high priority data callback
363 The callback runs in a high-priority thread that has better performance.
383 float noise = (float)(drand48() - 0.5);
401 application-specific data can be included within the class itself.
405 …allback for the master stream. Then use non-blocking I/O on the other streams. Here is an example…
408 The callback does a non-blocking read from the input stream placing the data into the buffer of the…
417 const int64_t timeoutNanos = 0; // for a non-blocking read
418 auto result = recordingStream->read(audioData, numFrames, timeoutNanos);
425 (numFrames - result.value()) * oboeStream->getBytesPerFrame());
447 …annels, format and sample rate. The format of the streams can be mismatched - as long as the code …
449 #### Data Callback - Do's and Don'ts
452 - allocate memory using, for example, malloc() or new
453 - file operations such as opening, closing, reading or writing
454 - network operations such as streaming
455 - use mutexes or other synchronization primitives
456 - sleep
457 - stop or close the stream
458 - Call read() or write() on the stream which invoked it
462 - AudioStream::get*()
463 - oboe::convertResultToText()
465 ### Setting performance mode argument
467 Every AudioStream has a *performance mode* which has a large effect on your app's behavior. There a…
473 You can select the performance mode by calling `setPerformanceMode()`,
482 …ble latency you must use the `PerformanceMode::LowLatency` performance mode along with a high-prio…