more conservative settings for hark; adjust volume indicators colors to dB scale, improved decay for audio indicators
parent
185b3d40bd
commit
ad3f7df203
|
|
@ -1030,20 +1030,20 @@ export default class RoomClient
|
||||||
this._hark = hark(this._harkStream,
|
this._hark = hark(this._harkStream,
|
||||||
{
|
{
|
||||||
play : false,
|
play : false,
|
||||||
interval : 5,
|
interval : 10,
|
||||||
threshold : store.getState().settings.noiseThreshold,
|
threshold : store.getState().settings.noiseThreshold,
|
||||||
history : 300
|
history : 100
|
||||||
});
|
});
|
||||||
this._hark.lastVolume = -100;
|
this._hark.lastVolume = -100;
|
||||||
|
|
||||||
this._hark.on('volume_change', (volume) =>
|
this._hark.on('volume_change', (volume) =>
|
||||||
{
|
{
|
||||||
volume = Math.round(volume);
|
volume = Math.round(volume);
|
||||||
if (this._micProducer && volume !== Math.round(this._hark.lastVolume))
|
if (this._micProducer && (volume !== Math.round(this._hark.lastVolume)))
|
||||||
{
|
{
|
||||||
if (volume < this._hark.lastVolume * 1.02)
|
if (volume < this._hark.lastVolume)
|
||||||
{
|
{
|
||||||
volume = this._hark.lastVolume * 1.02;
|
volume = this._hark.lastVolume - Math.pow((volume - this._hark.lastVolume)/(100 + this._hark.lastVolume),4)*2;
|
||||||
}
|
}
|
||||||
this._hark.lastVolume = volume;
|
this._hark.lastVolume = volume;
|
||||||
store.dispatch(peerVolumeActions.setPeerVolume(this._peerId, volume));
|
store.dispatch(peerVolumeActions.setPeerVolume(this._peerId, volume));
|
||||||
|
|
|
||||||
|
|
@ -58,27 +58,27 @@ const styles = () =>
|
||||||
'&.level6' :
|
'&.level6' :
|
||||||
{
|
{
|
||||||
height : '60%',
|
height : '60%',
|
||||||
backgroundColor : 'rgba(255, 0, 0, 0.65)'
|
backgroundColor : 'rgba(255, 165, 0, 0.65)'
|
||||||
},
|
},
|
||||||
'&.level7' :
|
'&.level7' :
|
||||||
{
|
{
|
||||||
height : '70%',
|
height : '70%',
|
||||||
backgroundColor : 'rgba(255, 0, 0, 0.65)'
|
backgroundColor : 'rgba(255, 100, 0, 0.65)'
|
||||||
},
|
},
|
||||||
'&.level8' :
|
'&.level8' :
|
||||||
{
|
{
|
||||||
height : '80%',
|
height : '80%',
|
||||||
backgroundColor : 'rgba(0, 0, 0, 0.65)'
|
backgroundColor : 'rgba(255, 60, 0, 0.65)'
|
||||||
},
|
},
|
||||||
'&.level9' :
|
'&.level9' :
|
||||||
{
|
{
|
||||||
height : '90%',
|
height : '90%',
|
||||||
backgroundColor : 'rgba(0, 0, 0, 0.65)'
|
backgroundColor : 'rgba(255, 30, 0, 0.65)'
|
||||||
},
|
},
|
||||||
'&.level10' :
|
'&.level10' :
|
||||||
{
|
{
|
||||||
height : '100%',
|
height : '100%',
|
||||||
backgroundColor : 'rgba(0, 0, 0, 0.65)'
|
backgroundColor : 'rgba(255, 0, 0, 0.65)'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
volumeSmall :
|
volumeSmall :
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue