-
Notifications
You must be signed in to change notification settings - Fork 0
/
Documentation070_ASIO.txt
85 lines (65 loc) · 4.22 KB
/
Documentation070_ASIO.txt
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
81
82
83
84
85
::v3.0::1o.2o22::2019.4.0::
================================================================================
ASIO on Windows:
================================================================================
When enabled via 'Asio' checkbox on 'AudioStream\Scripts\Resources\DevicesConfiguration' Scriptable Object
all sounds/resources created by all C# components and their inputs/outputs used in scenes on Windows use a special ASIO enabled system
(this includes "all" input and output functionality with the exception of 'AudioStream' which uses Unity Audio regardless of this setting; AudioStreamMinimal uses ASIO output)
Settings for output #0 configured here also apply for ASIO, except its buffers which are configured separately:
'ASIO buffer Size' must match ASIO config (see below)
'ASIO buffer Count' is set to 4 by default (you can try lower values)
// max. number of speakers is 32
// see also 'Devices config' in Documentation.txt
Unity Audio Mixer output/input effects can be added as ASIO enabled
'AudioStream ASIO OutputDevice' and 'AudioStream ASIO InputDevice'
when using their ASIO enabled variant be aware that it's not possible to use 'normal' C# components (either ASIO, or non ASIO) with ASIO-enabled mixer plugins in the same project
- ASIO requires exclusive internal initialization and using more than 1 FMOD system doesn't work.
--------------------------------------------------------------------------------------------------
Audio Mixer effects:
'AudioStream ASIO OutputDevice' and 'AudioStream ASIO InputDevice' work identically as normal variants, see
Documentation010_recording_and_inputs.txt
and Documentation020_system_outputs.txt
- all outputs are conflated to default (0) output, regardless of `OutputDevice ID` entered on mixer group
- similarly, the input plugin will record only from default (0) input (and will pass the input along the - non ASIO enabled - Unity mixer)
- ASIO buffer lenghts and buffer count *are hardcoded* to 512 and 4 currently
| sources for the audio plugin are included in AudioPlugin.zip
This way it's possible for Unity on Windows to output to an ASIO output from mixer.
(but as mentioned above C# components are not available in that case)
--------------------------------------------------------------------------------------------------
Example ASIO configuration:
ASIO was tested w/
FlexASIO [https://github.com/dechamps/FlexASIO/releases] driver, and configured via
FlexASIO_GUI [https://github.com/flipswitchingmonkey/FlexASIO_GUI/releases]
ASIO config is rather sensitive, so you should try various combinations suitable for your system.
Example configuration of FlexASIO which worked while developing it:
--------------------------------------------------------------------------------------------------
Backend: Windows DirectSound
Set Buffer Size On
Buffer Size e.g. 256 ('ASIO buffer Size' on DevicesConfiguration has to match)
Input Device pick one
Output Device pick one
Latency
Set Input Latency On
Input Latency 0.1
Set Output Latency On
Output Latency 0.1
WASAPI
Input
Set On
Exclusive On
AutoConvert Off
Output On
Set Exclusive Off
AutoConvert Off
Channels
- set correct # of input and output channels for devices selected above
--------------------------------------------------------------------------------------------------
Save to Default FlexASIO.toml
- this config will be picked up by FlexASIO when running a scene which uses one of the AudioStream's components with ASIO enabled.
It *might* work with other ASIO driver(s), but it was tested primarily with the above.
ASIO-enabled systems might not be fully stable when using 'Output devices' (AudioSourceOutputDevice, MediaSourceOutputDevice) components,
though it makes little sense to use them, since there are only 1 input and 1 output devices configured as per above
- the asset doesn't take any assumptions about underlying devices though and should be working in general with any inputs/outputs should it be possible to configure them
An example with
ASIO buffer 256 b large, 2 buffers is computed total latency on AudioStreamInput2D component in demo scene is 10.66 ms
with 128, 2 buffers is total latency 5.33 ms