Merge branch 'audio-mixer-volume-control' into addNewAudioControls

This commit is contained in:
Wayne Chen 2019-03-26 10:39:29 -07:00 committed by GitHub
commit e44cdb0d7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 17 deletions

View file

@ -345,7 +345,6 @@ Rectangle {
color: hifi.colors.white; color: hifi.colors.white;
text: qsTr("Choose input device"); text: qsTr("Choose input device");
} }
} }
ListView { ListView {
@ -394,6 +393,7 @@ Rectangle {
} }
} }
} }
AudioControls.LoopbackAudio { AudioControls.LoopbackAudio {
id: loopbackAudio id: loopbackAudio
x: margins.paddings x: margins.paddings
@ -438,6 +438,14 @@ Rectangle {
color: hifi.colors.white; color: hifi.colors.white;
text: qsTr("Choose output device"); text: qsTr("Choose output device");
} }
AudioControls.PlaySampleSound {
x: margins.paddings
visible: (bar.currentIndex === 1 && isVR) ||
(bar.currentIndex === 0 && !isVR);
anchors { right: parent.right }
}
} }
ListView { ListView {

View file

@ -60,11 +60,11 @@ RowLayout {
} }
} }
RalewayRegular { // RalewayRegular {
Layout.leftMargin: 2; // Layout.leftMargin: 2;
size: 14; // size: 14;
color: "white"; // color: "white";
font.italic: true // font.italic: true
text: audioLoopedBack ? qsTr("Speak in your input") : ""; // text: audioLoopedBack ? qsTr("Speak in your input") : "";
} // }
} }

View file

@ -64,11 +64,11 @@ RowLayout {
height: 32; height: 32;
} }
RalewayRegular { // RalewayRegular {
Layout.leftMargin: 2; // Layout.leftMargin: 2;
size: 14; // size: 14;
color: "white"; // color: "white";
font.italic: true // font.italic: true
text: isPlaying ? qsTr("Listen to your output") : ""; // text: isPlaying ? qsTr("Listen to your output") : "";
} // }
} }

View file

@ -1368,9 +1368,9 @@ bool AudioClient::mixLocalAudioInjectors(float* mixBuffer) {
memset(_localScratchBuffer, 0, bytesToRead); memset(_localScratchBuffer, 0, bytesToRead);
if (0 < injectorBuffer->readData((char*)_localScratchBuffer, bytesToRead)) { if (0 < injectorBuffer->readData((char*)_localScratchBuffer, bytesToRead)) {
bool isSystemSound = !injector->isPositionSet() && !injector->isAmbisonic(); bool isSystemSound = !options.positionSet && !options.ambisonic;
float gain = injector->getVolume() * (isSystemSound ? _systemInjectorGain : _localInjectorGain); float gain = options.volume * (isSystemSound ? _systemInjectorGain : _localInjectorGain);
if (options.ambisonic) { if (options.ambisonic) {