Skip to content
Permalink
Browse files

Handle undefined ENABLE_SPEEXDSP

  • Loading branch information
bear101 committed Mar 21, 2020
1 parent 378a7b8 commit c19a88cbd835fa1b67c38f32bf34d85d9545c988
@@ -672,8 +672,7 @@ TEAMTALKDLL_API TTBOOL TT_SetSoundInputPreprocess(IN TTInstance* lpTTInstance,
teamtalk::SpeexDSP spxdsp;
Convert(*lpSpeexDSP, spxdsp);

clientnode->SetSoundPreprocess(spxdsp);
return TRUE;
return clientnode->SetSoundPreprocess(spxdsp);
}

TEAMTALKDLL_API TTBOOL TT_GetSoundInputPreprocess(IN TTInstance* lpTTInstance,
@@ -242,9 +242,9 @@ int AudioThread::close(u_long)
return 0;
}

#if defined(ENABLE_SPEEXDSP)
bool AudioThread::UpdatePreprocess(const teamtalk::SpeexDSP& speexdsp)
{
#if defined(ENABLE_SPEEXDSP)
//if audio thread isn't running, then Speex preprocess is not set up
if(codec().codec == CODEC_NO_CODEC)
return true;
@@ -307,8 +307,10 @@ bool AudioThread::UpdatePreprocess(const teamtalk::SpeexDSP& speexdsp)
speexdsp.aec_suppress_level, speexdsp.aec_suppress_active);

return true;
}
#else
return false;
#endif
}

void AudioThread::MuteSound(bool leftchannel, bool rightchannel)
{
@@ -63,9 +63,7 @@ class AudioThread : protected ACE_Task<ACE_MT_SYNCH>
void QueueAudio(ACE_Message_Block* mb_audio);
bool IsVoiceActive() const;

#if defined(ENABLE_SPEEXDSP)
bool UpdatePreprocess(const teamtalk::SpeexDSP& speexdsp);
#endif
void MuteSound(bool leftchannel, bool rightchannel);

int m_voicelevel;
@@ -3071,14 +3071,14 @@ int ClientNode::GetVoiceGainLevel()
return m_soundprop.gainlevel;
}

void ClientNode::SetSoundPreprocess(const SpeexDSP& speexdsp)
bool ClientNode::SetSoundPreprocess(const SpeexDSP& speexdsp)
{
ASSERT_REACTOR_LOCKED(this);
rguard_t g_snd(lock_sndprop());

m_soundprop.speexdsp = speexdsp;

m_voice_thread.UpdatePreprocess(speexdsp);
return m_voice_thread.UpdatePreprocess(speexdsp);
}

void ClientNode::SetSoundInputTone(StreamTypes streams, int frequency)
@@ -330,7 +330,7 @@ namespace teamtalk {
void SetVoiceGainLevel(int gainlevel);
int GetVoiceGainLevel();

void SetSoundPreprocess(const SpeexDSP& speexdsp);
bool SetSoundPreprocess(const SpeexDSP& speexdsp);
void SetSoundInputTone(StreamTypes streams, int frequency);

bool StartRecordingMuxedAudioFile(const AudioCodec& codec,

0 comments on commit c19a88c

Please sign in to comment.
You can’t perform that action at this time.