You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/FullGuide.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,6 +362,22 @@ The callback does a non-blocking read from the input stream placing the data int
362
362
363
363
Note that in this example it is assumed the input and output streams have the same number of channels, format and sample rate. The format of the streams can be mismatched - as long as the code handles the translations properly.
364
364
365
+
#### Callback do's and don'ts
366
+
These are things the `onAudioReady` method should NOT do:
367
+
368
+
- allocate memory using, for example, malloc() or new
369
+
- any file operations such as opening, closing, reading or writing
370
+
- any network operations such as streaming
371
+
- use any mutexes or other synchronization primitives
372
+
- sleep
373
+
- stop or close the stream
374
+
- Call read() or write() on the stream which invoked it
375
+
376
+
The following methods are OK to call:
377
+
378
+
- AudioStream::get*()
379
+
- oboe::convertResultToText()
380
+
365
381
### Setting performance mode
366
382
367
383
Every AudioStream has a *performance mode* which has a large effect on your app's behavior. There are three modes:
0 commit comments