blob: 97ea46b151441c398e0ce964a889dbbdfe29158e [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
namespace remoting {
class AudioPacket;
class AudioCapturer {
typedef base::Callback<void(scoped_ptr<AudioPacket> packet)>
virtual ~AudioCapturer() {}
// Returns true if audio capturing is supported on this platform. If this
// returns true, then Create() must not return nullptr.
static bool IsSupported();
static scoped_ptr<AudioCapturer> Create();
// Capturers should sample at a 44.1 or 48 kHz sampling rate, in uncompressed
// PCM stereo format. Capturers may choose the number of frames per packet.
// Returns true on success.
virtual bool Start(const PacketCapturedCallback& callback) = 0;
static bool IsValidSampleRate(int sample_rate);
} // namespace remoting