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

Unified Diff: webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h

Issue 2790933002: Conversational speech tool, simualtor + unit tests (Closed)
Patch Set: map iterators simplified Created 3 years, 7 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: webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h b/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
index dd03a07e7a0014b722b9adbc14cad8cadbbbf0cd..bdd42c34bebf8ab8ca6583087b0884ba84abd6ea 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
+++ b/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
@@ -54,6 +54,7 @@ class MultiEndCall {
const std::map<std::string, std::unique_ptr<WavReaderInterface>>&
audiotrack_readers() const;
bool valid() const;
+ int sample_rate() const;
minyue-webrtc 2017/05/16 15:05:16 can put getter function inline int sample_rate_hz
AleBzk 2017/05/17 12:49:38 Done.
size_t total_duration_samples() const;
const std::vector<SpeakingTurn>& speaking_turns() const;
@@ -61,8 +62,10 @@ class MultiEndCall {
// Finds unique speaker names.
void FindSpeakerNames();
- // Creates one WavReader instance for each unique audiotrack.
- void CreateAudioTrackReaders();
+ // Creates one WavReader instance for each unique audiotrack. It returns false
+ // if the audio tracks do not have the same sample rate or if they are not
+ // mono.
+ bool CreateAudioTrackReaders();
// Validates the speaking turns timing information. Accepts cross-talk, but
// only up to 2 speakers. Rejects unordered turns and self cross-talk.
@@ -75,6 +78,7 @@ class MultiEndCall {
std::map<std::string, std::unique_ptr<WavReaderInterface>>
audiotrack_readers_;
bool valid_;
+ int sample_rate_;
minyue-webrtc 2017/05/16 15:05:16 needs a unit, ie., sample_rate_hz_;
AleBzk 2017/05/17 12:49:38 Done.
size_t total_duration_samples_;
std::vector<SpeakingTurn> speaking_turns_;

Powered by Google App Engine
This is Rietveld 408576698