Preview¶
Process for real-time preview and live sound on/off
Interface Overview¶
| interface Name | Functional Description |
|---|---|
NET_SDK_LivePlay | Live preview |
NET_SDK_OpenSound | Sound to turn on live preview |
NET_SDK_Volume | Adjust the volume of the live preview |
NET_SDK_CloseSound | Turn off live preview sound |
NET_SDK_StopLivePlay | Close Live Preview |
Note
For detailed parameters of the interface, see the interface definition section.
Process Description¶
---
title: Preview
---
flowchart TD
A(Device SDK initialization <br><strong>NET_SDK_Init</strong>)
B(User registers device <br><strong>NET_SDK_Login</strong> or <br><strong>NET_SDK_LoginEx</strong>)
subgraph SS [Sound control]
S0(Open sound <br><strong>NET_SDK_OpenSound</strong>)
S1(Adjust volume <br><strong>NET_SDK_Volume</strong>)
S2(Close sound <br><strong>NET_SDK_CloseSound</strong>)
S0 --> S1 --> S2
end
style SS fill:#e7b13387,stroke:#f66,stroke-width:2px,stroke-dasharray: 5
C(Stop preview <br><strong>NET_SDK_StopLivePlay</strong>)
E(Log out of device <br><strong>NET_SDK_Logout</strong>)
F(Release SDK resources <br><strong>NET_SDK_Cleanup</strong>)
A --> B --> SS --> C --> E --> F Note
The modules in the dashed box are: Control of the preview live sound in exclusive sound card mode, including turning on the sound, adjusting the volume, and turning off the sound
Sample Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
Relevant Instructions¶
-
The sample code contains only the switch sound in the preview state, and does not contain an example of adjusting the volume
-
Net_SDK_LivePlay returns -1 for failures, other values for handle parameters