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 27 matching lines...) Expand all Loading... |
38 // Even simpler buffers would likely just contain audio sample values of 0. | 38 // Even simpler buffers would likely just contain audio sample values of 0. |
39 static const int kHighSampleValue = 10000; | 39 static const int kHighSampleValue = 10000; |
40 | 40 |
41 // Same value as src/modules/audio_device/main/source/audio_device_config.h in | 41 // Same value as src/modules/audio_device/main/source/audio_device_config.h in |
42 // https://code.google.com/p/webrtc/ | 42 // https://code.google.com/p/webrtc/ |
43 static const uint32 kAdmMaxIdleTimeProcess = 1000; | 43 static const uint32 kAdmMaxIdleTimeProcess = 1000; |
44 | 44 |
45 // Constants here are derived by running VoE using a real ADM. | 45 // Constants here are derived by running VoE using a real ADM. |
46 // The constants correspond to 10ms of mono audio at 44kHz. | 46 // The constants correspond to 10ms of mono audio at 44kHz. |
47 static const int kTimePerFrameMs = 10; | 47 static const int kTimePerFrameMs = 10; |
48 static const int kNumberOfChannels = 1; | 48 static const uint8_t kNumberOfChannels = 1; |
49 static const int kSamplesPerSecond = 44000; | 49 static const int kSamplesPerSecond = 44000; |
50 static const int kTotalDelayMs = 0; | 50 static const int kTotalDelayMs = 0; |
51 static const int kClockDriftMs = 0; | 51 static const int kClockDriftMs = 0; |
52 static const uint32_t kMaxVolume = 14392; | 52 static const uint32_t kMaxVolume = 14392; |
53 | 53 |
54 enum { | 54 enum { |
55 MSG_START_PROCESS, | 55 MSG_START_PROCESS, |
56 MSG_RUN_PROCESS, | 56 MSG_RUN_PROCESS, |
57 MSG_STOP_PROCESS, | 57 MSG_STOP_PROCESS, |
58 }; | 58 }; |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 ASSERT(false); | 745 ASSERT(false); |
746 } | 746 } |
747 SetMicrophoneVolume(current_mic_level); | 747 SetMicrophoneVolume(current_mic_level); |
748 } | 748 } |
749 | 749 |
750 void FakeAudioCaptureModule::StopProcessP() { | 750 void FakeAudioCaptureModule::StopProcessP() { |
751 ASSERT(rtc::Thread::Current() == process_thread_); | 751 ASSERT(rtc::Thread::Current() == process_thread_); |
752 started_ = false; | 752 started_ = false; |
753 process_thread_->Clear(this); | 753 process_thread_->Clear(this); |
754 } | 754 } |
OLD | NEW |