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

Unified Diff: components/copresence/mediums/audio/audio_manager_impl.h

Issue 892423002: Adding some audio debugging flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows fix, take 2 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 side-by-side diff with in-line comments
Download patch
Index: components/copresence/mediums/audio/audio_manager_impl.h
diff --git a/components/copresence/mediums/audio/audio_manager_impl.h b/components/copresence/mediums/audio/audio_manager_impl.h
index 8148de6a1b753c08dc73064f0a298cb09efd3ed6..b660a7a9c35412ca34728ccc546d85baf4c687e2 100644
--- a/components/copresence/mediums/audio/audio_manager_impl.h
+++ b/components/copresence/mediums/audio/audio_manager_impl.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/cancelable_callback.h"
+#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
@@ -21,6 +22,10 @@ namespace base {
class Time;
}
+namespace media {
+class AudioBus;
+}
+
namespace copresence {
class AudioPlayer;
@@ -76,6 +81,10 @@ class AudioManagerImpl final : public AudioManager {
void DecodeSamplesConnector(const std::string& samples);
+ void DumpToken(AudioType audio_type,
+ const std::string& token,
+ const media::AudioBus* samples);
+
WhispernetClient* whispernet_client_;
// Callbacks to send tokens back to the CopresenceManager.
@@ -91,6 +100,7 @@ class AudioManagerImpl final : public AudioManager {
static_assert(INAUDIBLE == 1, "AudioType::INAUDIBLE should be 1.");
// Indexed using enum AudioType.
+ bool player_enabled_[2];
bool should_be_playing_[2];
bool should_be_recording_[2];
@@ -102,6 +112,7 @@ class AudioManagerImpl final : public AudioManager {
// Indexed using enum AudioType.
std::string playing_token_[2];
+ size_t token_length_[2];
base::Time started_playing_[2];
base::Time heard_own_token_[2];
@@ -110,7 +121,7 @@ class AudioManagerImpl final : public AudioManager {
// Indexed using enum AudioType.
ScopedVector<SamplesMap> samples_cache_;
- size_t token_length_[2];
+ base::FilePath dump_tokens_dir_;
DISALLOW_COPY_AND_ASSIGN(AudioManagerImpl);
};
« no previous file with comments | « components/copresence/copresence_switches.cc ('k') | components/copresence/mediums/audio/audio_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698