Update Mumlib audio callback and and 'override'. #1

This commit is contained in:
Michał Słomkowski 2015-11-17 23:15:52 +01:00
parent bfbf646e24
commit 0548fca0dd
4 changed files with 13 additions and 11 deletions

View File

@ -10,8 +10,11 @@ namespace mumble {
MumbleCommunicator *communicator;
virtual void audio(
int target,
int sessionId,
int sequenceNumber,
int16_t *pcm_data,
uint32_t pcm_data_size) {
uint32_t pcm_data_size) override {
communicator->onIncomingPcmSamples(pcm_data, pcm_data_size);
}
};

View File

@ -32,7 +32,7 @@ namespace mumble {
~MumbleCommunicator();
virtual void sendPcmSamples(int16_t *samples, unsigned int length);
virtual void sendPcmSamples(int16_t *samples, unsigned int length) override;
void sendTextMessage(std::string message);

View File

@ -16,7 +16,7 @@ namespace sip {
_LogWriter(Category &logger)
: logger(logger) { }
virtual void write(const pj::LogEntry &entry) {
virtual void write(const pj::LogEntry &entry) override {
auto message = entry.msg.substr(0, entry.msg.size() - 1); // remove newline
@ -93,11 +93,11 @@ namespace sip {
communicator(comm),
account(acc) { }
virtual void onCallState(pj::OnCallStateParam &prm);
virtual void onCallState(pj::OnCallStateParam &prm) override;
virtual void onCallMediaState(pj::OnCallMediaStateParam &prm);
virtual void onCallMediaState(pj::OnCallMediaStateParam &prm) override;
virtual void onDtmfDigit(pj::OnDtmfDigitParam &prm);
virtual void onDtmfDigit(pj::OnDtmfDigitParam &prm) override;
private:
sip::PjsuaCommunicator &communicator;
@ -109,9 +109,9 @@ namespace sip {
_Account(sip::PjsuaCommunicator &comm)
: communicator(comm) { }
virtual void onRegState(pj::OnRegStateParam &prm);
virtual void onRegState(pj::OnRegStateParam &prm) override;
virtual void onIncomingCall(pj::OnIncomingCallParam &iprm);
virtual void onIncomingCall(pj::OnIncomingCallParam &iprm) override;
private:
sip::PjsuaCommunicator &communicator;
@ -328,4 +328,3 @@ void sip::PjsuaCommunicator::sendPcmSamples(int16_t *samples, unsigned int lengt
pjsuaLogger.debug("Pushing %d samples to in-buff.", length);
pjmedia_circ_buf_write(inputBuff, samples, length);
}

View File

@ -39,7 +39,7 @@ namespace sip {
mesg += errorMsgBuffer;
}
virtual const char *what() const throw() {
virtual const char *what() const throw() override {
return mesg.c_str();
}
@ -67,7 +67,7 @@ namespace sip {
~PjsuaCommunicator();
virtual void sendPcmSamples(int16_t *samples, unsigned int length);
virtual void sendPcmSamples(int16_t *samples, unsigned int length) override;
std::function<void(std::string)> onStateChange;