mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 15:22:09 +02:00
CR fixes
This commit is contained in:
parent
72eb797910
commit
5033e7be11
3 changed files with 29 additions and 29 deletions
|
@ -160,7 +160,7 @@ MyAvatar::MyAvatar(RigPointer rig) :
|
|||
}
|
||||
|
||||
auto audioIO = DependencyManager::get<AudioClient>();
|
||||
audioIO->setPlayingBackRecording(isPlaying);
|
||||
audioIO->setIsPlayingBackRecording(isPlaying);
|
||||
|
||||
if (_rig) {
|
||||
_rig->setEnableAnimations(!isPlaying);
|
||||
|
|
|
@ -148,17 +148,17 @@ static inline float convertToFloat(int16_t sample) {
|
|||
AudioClient::AudioClient() :
|
||||
AbstractAudioInterface(),
|
||||
_gate(this),
|
||||
_audioInput(nullptr),
|
||||
_audioInput(NULL),
|
||||
_desiredInputFormat(),
|
||||
_inputFormat(),
|
||||
_numInputCallbackBytes(0),
|
||||
_audioOutput(nullptr),
|
||||
_audioOutput(NULL),
|
||||
_desiredOutputFormat(),
|
||||
_outputFormat(),
|
||||
_outputFrameSize(0),
|
||||
_numOutputCallbackBytes(0),
|
||||
_loopbackAudioOutput(nullptr),
|
||||
_loopbackOutputDevice(nullptr),
|
||||
_loopbackAudioOutput(NULL),
|
||||
_loopbackOutputDevice(NULL),
|
||||
_inputRingBuffer(0),
|
||||
_localInjectorsStream(0),
|
||||
_receivedAudioStream(RECEIVED_AUDIO_STREAM_CAPACITY_FRAMES),
|
||||
|
@ -176,9 +176,9 @@ AudioClient::AudioClient() :
|
|||
_isNoiseGateEnabled(true),
|
||||
_reverb(false),
|
||||
_reverbOptions(&_scriptReverbOptions),
|
||||
_inputToNetworkResampler(nullptr),
|
||||
_networkToOutputResampler(nullptr),
|
||||
_localToOutputResampler(nullptr),
|
||||
_inputToNetworkResampler(NULL),
|
||||
_networkToOutputResampler(NULL),
|
||||
_localToOutputResampler(NULL),
|
||||
_localAudioThread(this),
|
||||
_audioLimiter(AudioConstants::SAMPLE_RATE, OUTPUT_CHANNEL_COUNT),
|
||||
_outgoingAvatarAudioSequenceNumber(0),
|
||||
|
@ -393,9 +393,9 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
|
|||
}
|
||||
} else {
|
||||
HRESULT hr = S_OK;
|
||||
CoInitialize(nullptr);
|
||||
IMMDeviceEnumerator* pMMDeviceEnumerator = nullptr;
|
||||
CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&pMMDeviceEnumerator);
|
||||
CoInitialize(NULL);
|
||||
IMMDeviceEnumerator* pMMDeviceEnumerator = NULL;
|
||||
CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&pMMDeviceEnumerator);
|
||||
IMMDevice* pEndpoint;
|
||||
hr = pMMDeviceEnumerator->GetDefaultAudioEndpoint(mode == QAudio::AudioOutput ? eRender : eCapture, eMultimedia, &pEndpoint);
|
||||
if (hr == E_NOTFOUND) {
|
||||
|
@ -405,7 +405,7 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
|
|||
deviceName = friendlyNameForAudioDevice(pEndpoint);
|
||||
}
|
||||
pMMDeviceEnumerator->Release();
|
||||
pMMDeviceEnumerator = nullptr;
|
||||
pMMDeviceEnumerator = NULL;
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
|
@ -965,7 +965,7 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) {
|
|||
}
|
||||
|
||||
void AudioClient::handleAudioInput() {
|
||||
if (!_inputDevice || _playingBackRecording) {
|
||||
if (!_inputDevice || _isPlayingBackRecording) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1354,10 +1354,10 @@ bool AudioClient::switchInputToAudioDevice(const QAudioDeviceInfo& inputDeviceIn
|
|||
// That in turn causes it to be disconnected (see for example
|
||||
// http://stackoverflow.com/questions/9264750/qt-signals-and-slots-object-disconnect).
|
||||
_audioInput->stop();
|
||||
_inputDevice = nullptr;
|
||||
_inputDevice = NULL;
|
||||
|
||||
delete _audioInput;
|
||||
_audioInput = nullptr;
|
||||
_audioInput = NULL;
|
||||
_numInputCallbackBytes = 0;
|
||||
|
||||
_inputAudioDeviceName = "";
|
||||
|
@ -1366,7 +1366,7 @@ bool AudioClient::switchInputToAudioDevice(const QAudioDeviceInfo& inputDeviceIn
|
|||
if (_inputToNetworkResampler) {
|
||||
// if we were using an input to network resampler, delete it here
|
||||
delete _inputToNetworkResampler;
|
||||
_inputToNetworkResampler = nullptr;
|
||||
_inputToNetworkResampler = NULL;
|
||||
}
|
||||
|
||||
if (!inputDeviceInfo.isNull()) {
|
||||
|
@ -1461,29 +1461,29 @@ bool AudioClient::switchOutputToAudioDevice(const QAudioDeviceInfo& outputDevice
|
|||
_audioOutput->stop();
|
||||
|
||||
delete _audioOutput;
|
||||
_audioOutput = nullptr;
|
||||
_audioOutput = NULL;
|
||||
|
||||
_loopbackOutputDevice = nullptr;
|
||||
_loopbackOutputDevice = NULL;
|
||||
delete _loopbackAudioOutput;
|
||||
_loopbackAudioOutput = nullptr;
|
||||
_loopbackAudioOutput = NULL;
|
||||
|
||||
delete[] _outputMixBuffer;
|
||||
_outputMixBuffer = nullptr;
|
||||
_outputMixBuffer = NULL;
|
||||
|
||||
delete[] _outputScratchBuffer;
|
||||
_outputScratchBuffer = nullptr;
|
||||
_outputScratchBuffer = NULL;
|
||||
|
||||
delete[] _localOutputMixBuffer;
|
||||
_localOutputMixBuffer = nullptr;
|
||||
_localOutputMixBuffer = NULL;
|
||||
}
|
||||
|
||||
if (_networkToOutputResampler) {
|
||||
// if we were using an input to network resampler, delete it here
|
||||
delete _networkToOutputResampler;
|
||||
_networkToOutputResampler = nullptr;
|
||||
_networkToOutputResampler = NULL;
|
||||
|
||||
delete _localToOutputResampler;
|
||||
_localToOutputResampler = nullptr;
|
||||
_localToOutputResampler = NULL;
|
||||
}
|
||||
|
||||
if (!outputDeviceInfo.isNull()) {
|
||||
|
|
|
@ -145,7 +145,7 @@ public:
|
|||
void setPositionGetter(AudioPositionGetter positionGetter) { _positionGetter = positionGetter; }
|
||||
void setOrientationGetter(AudioOrientationGetter orientationGetter) { _orientationGetter = orientationGetter; }
|
||||
|
||||
void setPlayingBackRecording(bool playingBackRecording) { _playingBackRecording = playingBackRecording; }
|
||||
void setIsPlayingBackRecording(bool isPlayingBackRecording) { _isPlayingBackRecording = isPlayingBackRecording; }
|
||||
|
||||
Q_INVOKABLE void setAvatarBoundingBoxParameters(glm::vec3 corner, glm::vec3 scale);
|
||||
|
||||
|
@ -328,14 +328,14 @@ private:
|
|||
// for local audio (used by audio injectors thread)
|
||||
float _localMixBuffer[AudioConstants::NETWORK_FRAME_SAMPLES_STEREO];
|
||||
int16_t _localScratchBuffer[AudioConstants::NETWORK_FRAME_SAMPLES_AMBISONIC];
|
||||
float* _localOutputMixBuffer { nullptr };
|
||||
float* _localOutputMixBuffer { NULL };
|
||||
AudioInjectorsThread _localAudioThread;
|
||||
Mutex _localAudioMutex;
|
||||
|
||||
// for output audio (used by this thread)
|
||||
int _outputPeriod { 0 };
|
||||
float* _outputMixBuffer { nullptr };
|
||||
int16_t* _outputScratchBuffer { nullptr };
|
||||
float* _outputMixBuffer { NULL };
|
||||
int16_t* _outputScratchBuffer { NULL };
|
||||
|
||||
AudioLimiter _audioLimiter;
|
||||
|
||||
|
@ -373,7 +373,7 @@ private:
|
|||
|
||||
QVector<AudioInjector*> _activeLocalAudioInjectors;
|
||||
|
||||
bool _playingBackRecording { false };
|
||||
bool _isPlayingBackRecording { false };
|
||||
|
||||
CodecPluginPointer _codec;
|
||||
QString _selectedCodecName;
|
||||
|
|
Loading…
Reference in a new issue