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

« back to all changes in this revision

Viewing changes to daemon/src/audio/audiorecord.h

  • 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:
31
31
#ifndef _AUDIO_RECORD_H
32
32
#define _AUDIO_RECORD_H
33
33
 
 
34
#include "audiobuffer.h"
 
35
#include "sfl_types.h"
 
36
#include "noncopyable.h"
 
37
 
 
38
#include <memory>
34
39
#include <string>
35
40
#include <cstdlib>
36
 
#include <memory>
37
 
 
38
 
#include "sfl_types.h"
39
 
#include "noncopyable.h"
40
 
#include "audiobuffer.h"
41
41
 
42
42
class SndfileHandle;
43
43
 
47
47
        AudioRecord();
48
48
        ~AudioRecord();
49
49
 
50
 
        void setSndSamplingRate(int smplRate);
51
 
        void setRecordingOptions(int sndSmplRate, const std::string &path);
 
50
        void setSndFormat(AudioFormat format);
 
51
        void setRecordingOptions(AudioFormat format, const std::string &path);
52
52
 
53
53
        /**
54
54
         * Init recording file path
104
104
         * @param buffer  The data chunk to be recorded
105
105
         * @param nSamples Number of samples (number of bytes) to be recorded
106
106
         */
107
 
        //void recData(SFLDataFormat* buffer, size_t nSamples);
108
107
        void recData(AudioBuffer& buffer);
109
108
 
110
109
    protected:
133
132
        /**
134
133
         * Number of channels
135
134
         */
136
 
        int16_t channels_;
137
 
 
138
 
        /**
139
 
         * Sampling rate
140
 
         */
141
 
        int sndSmplRate_;
142
 
 
143
 
        /**
144
 
         * Maximum number of samples
145
 
         */
146
 
        static const int NB_SAMPLES_MAX = 3000;
 
135
        AudioFormat sndFormat_;
147
136
 
148
137
        /**
149
138
         * Recording flage