Commit c0e7f4c
committed
v3.3.0: StreamedAudioSource improvements
Several improvements to StreamedAudioSource:
- target latency for defining audio buffer duration
- audio frame lifetime and expiration to prevent looping
- audio pitch/speech manipulation to handle latency fluctuations
- IsBuffering property re-added
Deprecations:
- Play and Stop methods. Audio will always be playing as long as there is buffered audio to play. It automatically stops when it's played all the audio. If you want to Stop playback, starve the instance instead of feeding it audio.
- FrameCountForPlay. Target latency provides much more intuitive control over how much audio should be buffered before playback begins.
Huge thanks to [Metater's MetaVoiceChat](https://github.com/Metater/MetaVoiceChat) repository and the helpful discussion we had on Discord! The MetaVoiceChat project does these things really well and made it really easy for me to refer and implement in UniMic.
Also, added an asmdef for the samples.1 parent 375ba75 commit c0e7f4c
File tree
5 files changed
+235
-197
lines changed- Assets/UniMic
- Runtime
- Samples
5 files changed
+235
-197
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | | - | |
23 | 20 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 21 | | |
30 | 22 | | |
31 | | - | |
32 | | - | |
33 | 23 | | |
34 | 24 | | |
35 | 25 | | |
| |||
44 | 34 | | |
45 | 35 | | |
46 | 36 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 37 | | |
52 | 38 | | |
53 | 39 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 40 | | |
59 | 41 | | |
0 commit comments