mirror of
https://github.com/rehlds/revoice.git
synced 2024-12-27 23:25:53 +03:00
Access to pending samples in the Silk encoding buffer
This commit is contained in:
parent
8eb9367dcd
commit
f2c262cdb4
@ -1,6 +1,6 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
CSteamP2PCodec::CSteamP2PCodec(IVoiceCodec* backend) {
|
||||
CSteamP2PCodec::CSteamP2PCodec(VoiceEncoder_Silk* backend) {
|
||||
m_BackendCodec = backend;
|
||||
}
|
||||
|
||||
|
@ -5,16 +5,18 @@
|
||||
|
||||
class CSteamP2PCodec : public IVoiceCodec {
|
||||
public:
|
||||
CSteamP2PCodec(IVoiceCodec* backend);
|
||||
CSteamP2PCodec(VoiceEncoder_Silk* backend);
|
||||
virtual bool Init(int quality);
|
||||
virtual void Release();
|
||||
virtual int Compress(const char *pUncompressedBytes, int nSamples, char *pCompressed, int maxCompressedBytes, bool bFinal);
|
||||
virtual int Decompress(const char *pCompressed, int compressedBytes, char *pUncompressed, int maxUncompressedBytes);
|
||||
virtual bool ResetState();
|
||||
|
||||
VoiceEncoder_Silk* GetSilkCodec() const { return m_BackendCodec; }
|
||||
|
||||
private:
|
||||
int StreamDecode(const char *pCompressed, int compressedBytes, char *pUncompressed, int maxUncompressedBytes) const;
|
||||
int StreamEncode(const char *pUncompressedBytes, int nSamples, char *pCompressed, int maxCompressedBytes, bool bFinal) const;
|
||||
private:
|
||||
IVoiceCodec* m_BackendCodec;
|
||||
VoiceEncoder_Silk* m_BackendCodec;
|
||||
};
|
@ -27,4 +27,5 @@ public:
|
||||
virtual int Compress(const char *pUncompressedBytes, int nSamples, char *pCompressed, int maxCompressedBytes, bool bFinal);
|
||||
virtual int Decompress(const char *pCompressed, int compressedBytes, char *pUncompressed, int maxUncompressedBytes);
|
||||
|
||||
int GetNumQueuedEncodingSamples() const { return m_bufOverflowBytes.TellPut() / 2; }
|
||||
}; /* size: 100 */
|
Loading…
Reference in New Issue
Block a user