Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VAUnity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
VAUnity
Commits
20022808
Commit
20022808
authored
Oct 20, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Downloads
Patches
Plain Diff
Adding artificial reverb script (in development)
parent
f8680e81
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
VAURendererArtificialReverb.cs
+46
-0
46 additions, 0 deletions
VAURendererArtificialReverb.cs
with
46 additions
and
0 deletions
VAURendererArtificialReverb.cs
0 → 100644
+
46
−
0
View file @
20022808
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
VAURendererArtificialReverb
:
MonoBehaviour
:
VAURendererController
{
public
string
RendererID
=
""
;
public
double
RoomReverberationTime
=
1.2
;
// s
public
double
RoomSurfaceArea
=
220.0
;
// m^2
public
double
RoomVolume
=
600.0
;
// m^3
private
double
RoomReverberationTimeShadow
;
private
double
RoomSurfaceAreaShadow
;
private
double
RoomVolumeShadow
;
void
Start
()
{
VAUAdapter
.
VA
.
SetArtificialRevberationTime
(
RendererID
,
RoomReverberationTime
);
VAUAdapter
.
VA
.
SetArtificialSurfaceArea
(
RendererID
,
RoomSurfaceArea
);
VAUAdapter
.
VA
.
SetArtificialRoomVolume
(
RendererID
,
RoomVolume
);
RoomReverberationTimeShadow
=
OutputMuted
;
RoomSurfaceAreaShadow
=
RoomSurfaceArea
;
RoomVolumeShadow
=
RoomVolume
;
}
void
Update
()
{
if
(
RoomReverberationTime
!=
RoomReverberationTimeShadow
)
{
VAUAdapter
.
VA
.
SetArtificialRevberationTime
(
RendererID
,
RoomReverberationTime
);
RoomReverberationTimeShadow
=
RoomReverberationTime
;
}
if
(
RoomSurfaceArea
!=
RoomSurfaceAreaShadow
)
{
VAUAdapter
.
VA
.
SetArtificialSurfaceArea
(
RendererID
,
RoomSurfaceArea
);
RoomSurfaceAreaShadow
=
RoomSurfaceArea
;
}
if
(
RoomVolume
!=
RoomVolumeShadow
)
{
VAUAdapter
.
VA
.
SetArtificialRoomVolume
(
RendererID
,
RoomVolume
);
RoomVolumeShadow
=
RoomVolume
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment