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.
5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_
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 copresence {
19 // The AudioRecorder class will record audio until told to stop.
22 typedef base::Callback<void(const std::string&)> RecordedSamplesCallback;
24 // Initializes the object. Do not use this object before calling this method.
25 virtual void Initialize(const RecordedSamplesCallback& decode_callback) = 0;
27 virtual void Record() = 0;
28 virtual void Stop() = 0;
30 // Cleans up and deletes this object. Do not use object after this call.
31 virtual void Finalize() = 0;
33 virtual bool IsRecording() = 0;
36 virtual ~AudioRecorder() {};
39 } // namespace copresence
41 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_H_