Use multiline attribute to check for IA2_STATE_MULTILINE.
[chromium-blink-merge.git] / components / audio_modem / audio_recorder.h
blobbfdd3f670cbba65194a0639cad0a3bcc11fe6b67
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_
6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_
8 #include <string>
10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "media/audio/audio_io.h"
14 #include "media/audio/audio_parameters.h"
15 #include "media/base/audio_converter.h"
17 namespace audio_modem {
19 // The AudioRecorder class will record audio until told to stop.
20 class AudioRecorder {
21 public:
22 using RecordedSamplesCallback = base::Callback<void(const std::string&)>;
24 // Initializes the object. Do not use this object before calling this method.
25 virtual void Initialize(const RecordedSamplesCallback& decode_callback) = 0;
27 // If we are already recording, this function will do nothing.
28 virtual void Record() = 0;
29 // If we are already stopped, this function will do nothing.
30 virtual void Stop() = 0;
32 // Cleans up and deletes this object. Do not use object after this call.
33 virtual void Finalize() = 0;
35 protected:
36 virtual ~AudioRecorder() {}
39 } // namespace audio_modem
41 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_