~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/audio/audioloop.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include "logger.h"
46
46
 
47
47
AudioLoop::AudioLoop(unsigned int sampleRate) :
48
 
    buffer_(new AudioBuffer(0, 1, sampleRate)), pos_(0)
 
48
    buffer_(new AudioBuffer(0, AudioFormat(sampleRate, 1))), pos_(0)
49
49
{}
50
50
 
51
51
AudioLoop::~AudioLoop()
80
80
        return;
81
81
    }
82
82
 
83
 
    while (total_samples > 0) {
 
83
    while (total_samples != 0) {
84
84
        size_t samples = std::min(total_samples, buf_samples - pos);
85
85
 
86
86
        output.copy(*buffer_, samples, pos, output_pos);