Permalink
Browse files

Fix incorrect use of boost::smart_ptr in AudioX files

  • Loading branch information...
hacst committed Aug 8, 2010
1 parent 346dfcc commit b646c5387bbfdf0029de49c8584da1df0e749f0b
Showing with 6 additions and 3 deletions.
  1. +5 −2 src/mumble/AudioInput.cpp
  2. +1 −1 src/mumble/AudioOutput.cpp
@@ -886,8 +886,11 @@ void AudioInput::flushCheck(const QByteArray &frame, bool terminator) {
pds << g.p->fPosition[2];
}
- if (g.sh && g.sh->recorder) {
- g.sh->recorder->recordUser->addFrame(QByteArray(data, pds.size() + 1));
+ if (g.sh) {
+ VoiceRecorderPtr recorder(g.sh->recorder);
+ if (recorder) {
+ recorder->recordUser->addFrame(QByteArray(data, pds.size() + 1));
+ }
}
if (g.s.lmLoopMode == Settings::Local)
@@ -976,7 +976,7 @@ bool AudioOutput::mix(void *outbuff, unsigned int nsamp) {
const float adjustFactor = std::pow(10, -18. / 20);
const float mul = g.s.fVolume;
const unsigned int nchan = iChannels;
- boost::shared_ptr<VoiceRecorder> recorder;
+ VoiceRecorderPtr recorder;
if (g.sh) {
recorder = g.sh->recorder;
}

0 comments on commit b646c53

Please sign in to comment.