mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
change to fix Mac linker error
This commit is contained in:
parent
779e7631a1
commit
77dad6fe65
3 changed files with 8 additions and 7 deletions
|
@ -1589,8 +1589,9 @@ void Audio::renderLineStrip(const float* color, int x, int y, int n, int offset,
|
|||
|
||||
|
||||
void Audio::outputFormatChanged() {
|
||||
_outputFrameSize = NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL * _outputFormat.channelCount() * _outputFormat.sampleRate() / _desiredOutputFormat.sampleRate();
|
||||
_receivedAudioStream.outputFormatChanged(_outputFormat);
|
||||
int outputFormatChannelCountTimesSampleRate = _outputFormat.channelCount() * _outputFormat.sampleRate();
|
||||
_outputFrameSize = NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL * outputFormatChannelCountTimesSampleRate / _desiredOutputFormat.sampleRate();
|
||||
_receivedAudioStream.outputFormatChanged(outputFormatChannelCountTimesSampleRate);
|
||||
}
|
||||
|
||||
bool Audio::switchInputToAudioDevice(const QAudioDeviceInfo& inputDeviceInfo) {
|
||||
|
|
|
@ -16,8 +16,8 @@ MixedProcessedAudioStream ::MixedProcessedAudioStream (int numFrameSamples, int
|
|||
{
|
||||
}
|
||||
|
||||
void MixedProcessedAudioStream::outputFormatChanged(const QAudioFormat& outputFormat) {
|
||||
_outputFormatChannelsTimesSampleRate = outputFormat.channelCount() * outputFormat.sampleRate();
|
||||
void MixedProcessedAudioStream::outputFormatChanged(int outputFormatChannelCountTimesSampleRate) {
|
||||
_outputFormatChannelsTimesSampleRate = outputFormatChannelCountTimesSampleRate;
|
||||
int deviceOutputFrameSize = NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL * _outputFormatChannelsTimesSampleRate / SAMPLE_RATE;
|
||||
_ringBuffer.resizeForFrameSize(deviceOutputFrameSize);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#ifndef hifi_MixedProcessedAudioStream_h
|
||||
#define hifi_MixedProcessedAudioStream_h
|
||||
|
||||
#include <QtMultimedia/QAudioFormat>
|
||||
#include "InboundAudioStream.h"
|
||||
|
||||
class MixedProcessedAudioStream : public InboundAudioStream {
|
||||
|
@ -20,12 +19,13 @@ class MixedProcessedAudioStream : public InboundAudioStream {
|
|||
public:
|
||||
MixedProcessedAudioStream (int numFrameSamples, int numFramesCapacity, bool dynamicJitterBuffers, int staticDesiredJitterBufferFrames, int maxFramesOverDesired, bool useStDevForJitterCalc);
|
||||
|
||||
void outputFormatChanged(const QAudioFormat& outputFormat);
|
||||
|
||||
signals:
|
||||
|
||||
void processSamples(const QByteArray& inputBuffer, QByteArray& outputBuffer);
|
||||
|
||||
public:
|
||||
void outputFormatChanged(int outputFormatChannelCountTimesSampleRate);
|
||||
|
||||
protected:
|
||||
int parseStreamProperties(PacketType type, const QByteArray& packetAfterSeqNum, int& numAudioSamples);
|
||||
int parseAudioData(PacketType type, const QByteArray& packetAfterStreamProperties, int numAudioSamples);
|
||||
|
|
Loading…
Reference in a new issue