mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
Ref T730, style and log messages
This commit is contained in:
committed by
Mat Sutcliffe
parent
e30b690191
commit
401c89aa63
@@ -8,11 +8,11 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKSOUND_OPUSENCODER_H
|
||||
#define BLACKSOUND_OPUSENCODER_H
|
||||
#ifndef BLACKSOUND_CODECS_OPUSENCODER_H
|
||||
#define BLACKSOUND_CODECS_OPUSENCODER_H
|
||||
|
||||
#include "blacksound/blacksoundexport.h"
|
||||
#include "opus/opus.h"
|
||||
#include "blacksound/blacksoundexport.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
@@ -31,18 +31,20 @@ namespace BlackSound
|
||||
//! Dtor
|
||||
~COpusEncoder();
|
||||
|
||||
//! Bit rate
|
||||
void setBitRate(int bitRate);
|
||||
|
||||
//! \param frameCount Number of audio samples per frame
|
||||
//! \returns the size of an audio frame in bytes
|
||||
int frameByteCount(int frameCount);
|
||||
|
||||
//! Frame count
|
||||
int frameCount(const QVector<qint16> pcmSamples);
|
||||
|
||||
QByteArray encode(const QVector<qint16> pcmSamples, int samplesLength, int *encodedLength);
|
||||
|
||||
private:
|
||||
OpusEncoder *opusEncoder;
|
||||
OpusEncoder *opusEncoder = nullptr;
|
||||
int m_sampleRate;
|
||||
int m_channels;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace BlackSound
|
||||
int CMixingSampleProvider::readSamples(QVector<float> &samples, qint64 count)
|
||||
{
|
||||
samples.clear();
|
||||
samples.fill(0, count);
|
||||
samples.fill(0, static_cast<int>(count));
|
||||
int outputLen = 0;
|
||||
|
||||
QVector<ISampleProvider *> finishedProviders;
|
||||
@@ -46,5 +46,5 @@ namespace BlackSound
|
||||
|
||||
return outputLen;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user