| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * libjingle |    2  * libjingle | 
|    3  * Copyright 2012 Google Inc. |    3  * Copyright 2012 Google Inc. | 
|    4  * |    4  * | 
|    5  * Redistribution and use in source and binary forms, with or without |    5  * Redistribution and use in source and binary forms, with or without | 
|    6  * modification, are permitted provided that the following conditions are met: |    6  * modification, are permitted provided that the following conditions are met: | 
|    7  * |    7  * | 
|    8  *  1. Redistributions of source code must retain the above copyright notice, |    8  *  1. Redistributions of source code must retain the above copyright notice, | 
|    9  *     this list of conditions and the following disclaimer. |    9  *     this list of conditions and the following disclaimer. | 
|   10  *  2. Redistributions in binary form must reproduce the above copyright notice, |   10  *  2. Redistributions in binary form must reproduce the above copyright notice, | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  119     memset(audio_buffer, 0, audio_buffer_size); |  119     memset(audio_buffer, 0, audio_buffer_size); | 
|  120     return audio_buffer_size; |  120     return audio_buffer_size; | 
|  121   } |  121   } | 
|  122   size_t CopyFromRecBuffer(void* audio_buffer, size_t audio_buffer_size) { |  122   size_t CopyFromRecBuffer(void* audio_buffer, size_t audio_buffer_size) { | 
|  123     EXPECT_EQ(audio_buffer_size, rec_buffer_bytes_); |  123     EXPECT_EQ(audio_buffer_size, rec_buffer_bytes_); | 
|  124     const size_t min_buffer_size = min(audio_buffer_size, rec_buffer_bytes_); |  124     const size_t min_buffer_size = min(audio_buffer_size, rec_buffer_bytes_); | 
|  125     memcpy(audio_buffer, rec_buffer_, min_buffer_size); |  125     memcpy(audio_buffer, rec_buffer_, min_buffer_size); | 
|  126     return min_buffer_size; |  126     return min_buffer_size; | 
|  127   } |  127   } | 
|  128  |  128  | 
|  129   mutable rtc::CriticalSection crit_; |  129   rtc::CriticalSection crit_; | 
|  130  |  130  | 
|  131   int push_iterations_; |  131   int push_iterations_; | 
|  132   int pull_iterations_; |  132   int pull_iterations_; | 
|  133  |  133  | 
|  134   char rec_buffer_[FakeAudioCaptureModule::kNumberSamples * |  134   char rec_buffer_[FakeAudioCaptureModule::kNumberSamples * | 
|  135                    FakeAudioCaptureModule::kNumberBytesPerSample]; |  135                    FakeAudioCaptureModule::kNumberBytesPerSample]; | 
|  136   size_t rec_buffer_bytes_; |  136   size_t rec_buffer_bytes_; | 
|  137 }; |  137 }; | 
|  138  |  138  | 
|  139 TEST_F(FakeAdmTest, TestProccess) { |  139 TEST_F(FakeAdmTest, TestProccess) { | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  207  |  207  | 
|  208   EXPECT_EQ(0, fake_audio_capture_module_->InitRecording()); |  208   EXPECT_EQ(0, fake_audio_capture_module_->InitRecording()); | 
|  209   EXPECT_EQ(0, fake_audio_capture_module_->StartRecording()); |  209   EXPECT_EQ(0, fake_audio_capture_module_->StartRecording()); | 
|  210  |  210  | 
|  211   EXPECT_TRUE_WAIT(push_iterations() > 0, kMsInSecond); |  211   EXPECT_TRUE_WAIT(push_iterations() > 0, kMsInSecond); | 
|  212   EXPECT_TRUE_WAIT(pull_iterations() > 0, kMsInSecond); |  212   EXPECT_TRUE_WAIT(pull_iterations() > 0, kMsInSecond); | 
|  213  |  213  | 
|  214   EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); |  214   EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); | 
|  215   EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); |  215   EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); | 
|  216 } |  216 } | 
| OLD | NEW |