#include "media/audio/fake_audio_input_stream.h"
#include <memory>
#include <string>
#include "base/atomicops.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/string_split.h"
#include "base/synchronization/lock.h"
#include "base/task/single_thread_task_runner.h"
#include "base/thread_annotations.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/simple_sources.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_parameters.h"
#include "media/base/media_switches.h"
namespace media {
namespace {
std::atomic<bool> g_fake_input_streams_are_muted;
}
AudioInputStream* FakeAudioInputStream::MakeFakeStream(
AudioManagerBase* manager,
const AudioParameters& params) { … }
FakeAudioInputStream::FakeAudioInputStream(AudioManagerBase* manager,
const AudioParameters& params)
: … { … }
FakeAudioInputStream::~FakeAudioInputStream() { … }
AudioInputStream::OpenOutcome FakeAudioInputStream::Open() { … }
void FakeAudioInputStream::Start(AudioInputCallback* callback) { … }
void FakeAudioInputStream::Stop() { … }
void FakeAudioInputStream::Close() { … }
double FakeAudioInputStream::GetMaxVolume() { … }
void FakeAudioInputStream::SetVolume(double volume) { … }
double FakeAudioInputStream::GetVolume() { … }
bool FakeAudioInputStream::IsMuted() { … }
bool FakeAudioInputStream::SetAutomaticGainControl(bool enabled) { … }
bool FakeAudioInputStream::GetAutomaticGainControl() { … }
void FakeAudioInputStream::SetOutputDeviceForAec(
const std::string& output_device_id) { … }
void FakeAudioInputStream::ReadAudioFromSource(base::TimeTicks ideal_time,
base::TimeTicks now) { … }
AudioSourceCallback;
std::unique_ptr<AudioSourceCallback> FakeAudioInputStream::ChooseSource() { … }
void FakeAudioInputStream::BeepOnce() { … }
void FakeAudioInputStream::SetGlobalMutedState(bool is_muted) { … }
}