Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
VAUnity
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
VAUnity
Commits
e1e43f6d
Commit
e1e43f6d
authored
Aug 31, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding gain and mute state controller for rendering and reproduction modules
parent
9ecef3f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
0 deletions
+72
-0
VAURendererController.cs
VAURendererController.cs
+36
-0
VAUReproductionController.cs
VAUReproductionController.cs
+36
-0
No files found.
VAURendererController.cs
0 → 100644
View file @
e1e43f6d
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
VAURendererController
:
MonoBehaviour
{
public
string
RendererID
=
""
;
public
bool
OutputMuted
=
false
;
public
double
OutputGain
=
1.0
;
private
bool
OutputMutedShadow
;
private
double
OutputGainShadow
;
void
Start
()
{
VAUAdapter
.
VA
.
SetRenderingModuleMuted
(
RendererID
,
OutputMuted
);
VAUAdapter
.
VA
.
SetRenderingModuleGain
(
RendererID
,
OutputGain
);
OutputMutedShadow
=
OutputMuted
;
OutputGainShadow
=
OutputGain
;
}
void
Update
()
{
if
(
OutputMuted
!=
OutputMutedShadow
)
{
VAUAdapter
.
VA
.
SetRenderingModuleMuted
(
RendererID
,
OutputMuted
);
OutputMutedShadow
=
OutputMuted
;
}
if
(
OutputGain
!=
OutputGainShadow
)
{
VAUAdapter
.
VA
.
SetRenderingModuleGain
(
RendererID
,
OutputGain
);
OutputGainShadow
=
OutputGain
;
}
}
}
VAUReproductionController.cs
0 → 100644
View file @
e1e43f6d
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
VAUReproductionController
:
MonoBehaviour
{
public
string
ReproductionID
=
""
;
public
bool
OutputMuted
=
false
;
public
double
OutputGain
=
1.0
;
private
bool
OutputMutedShadow
;
private
double
OutputGainShadow
;
void
Start
()
{
VAUAdapter
.
VA
.
SetReproductionModuleMuted
(
ReproductionID
,
OutputMuted
);
VAUAdapter
.
VA
.
SetReproductionModuleGain
(
ReproductionID
,
OutputGain
);
OutputMutedShadow
=
OutputMuted
;
OutputGainShadow
=
OutputGain
;
}
void
Update
()
{
if
(
OutputMuted
!=
OutputMutedShadow
)
{
VAUAdapter
.
VA
.
SetReproductionModuleMuted
(
ReproductionID
,
OutputMuted
);
OutputMutedShadow
=
OutputMuted
;
}
if
(
OutputGain
!=
OutputGainShadow
)
{
VAUAdapter
.
VA
.
SetReproductionModuleGain
(
ReproductionID
,
OutputGain
);
OutputGainShadow
=
OutputGain
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment