Skip to content

Commit c5732f2

Browse files
committed
gsuiChannels: setAnalyserType
1 parent 6bd70de commit c5732f2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

gsuiChannels/gsuiChannels.js

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class gsuiChannels extends gsui0ne {
99
#chanSelected = null;
1010
#analyserW = 10;
1111
#analyserH = 50;
12+
#analyserType = "hz";
1213
static #selectChanPopup = GSUgetTemplate( "gsui-channels-selectPopup" );
1314
static #selectChanInput = gsuiChannels.#selectChanPopup.querySelector( "select" );
1415

@@ -61,6 +62,10 @@ class gsuiChannels extends gsui0ne {
6162
chans.forEach( chan => chan.$analyser.$setResolution( width, height ) );
6263
}
6364
}
65+
$setAnalyserType( t ) {
66+
this.#analyserType = t;
67+
this.querySelectorAll( "gsui-channel gsui-analyser-hist" ).forEach( el => el.$setType( t ) );
68+
}
6469
$updateVu( ldata, rdata ) {
6570
this.$elements.$vu.$draw( ldata, rdata );
6671
}
@@ -111,6 +116,7 @@ class gsuiChannels extends gsui0ne {
111116
.then( name => this.$onchange( "renameChannel", id, name ) );
112117
};
113118
chan.$analyser.$setResolution( this.#analyserW, this.#analyserH );
119+
chan.$analyser.$setType( this.#analyserType );
114120
if ( this.#chanSelected ) {
115121
this.#updateChanConnections();
116122
} else if ( id === "main" ) {

gsuiMixer/gsuiMixer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class gsuiMixer extends gsui0ne {
4848
$attributeChanged( prop, val ) {
4949
switch ( prop ) {
5050
case "analyser":
51-
this.querySelectorAll( "gsui-channel gsui-analyser-hist" ).forEach( el => el.$setType( val ) );
51+
this.$elements.$channels.$setAnalyserType( val );
5252
break;
5353
}
5454
}

0 commit comments

Comments
 (0)