Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: components/copresence/mediums/audio/audio_recorder.h

Issue 865483005: Creating the audio_modem component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging again Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_
7
8 #include <string>
9
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"
16
17 namespace copresence {
18
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&)>;
23
24 // Initializes the object. Do not use this object before calling this method.
25 virtual void Initialize(const RecordedSamplesCallback& decode_callback) = 0;
26
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;
31
32 // Cleans up and deletes this object. Do not use object after this call.
33 virtual void Finalize() = 0;
34
35 protected:
36 virtual ~AudioRecorder() {}
37 };
38
39 } // namespace copresence
40
41 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698