Skip to content

Commit 0393ed4

Browse files
authored
Updated guidance on what not to do inside the callback
1 parent f380287 commit 0393ed4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/FullGuide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,12 @@ The callback does a non-blocking read from the input stream placing the data int
348348
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.
349349

350350
#### Callback do's and don'ts
351-
These are things the `onAudioReady` method should NOT do:
351+
You should never perform an operation which could block inside `onAudioReady`. Examples of blocking operations include:
352352

353353
- allocate memory using, for example, malloc() or new
354-
- any file operations such as opening, closing, reading or writing
355-
- any network operations such as streaming
356-
- use any mutexes or other synchronization primitives
354+
- file operations such as opening, closing, reading or writing
355+
- network operations such as streaming
356+
- use mutexes or other synchronization primitives
357357
- sleep
358358
- stop or close the stream
359359
- Call read() or write() on the stream which invoked it

0 commit comments

Comments
 (0)