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

Side by Side Diff: third_party/WebKit/Source/platform/audio/AudioDelayDSPKernel.cpp

Issue 2604683002: Remove ASSERT_NOT_REACHED() in audio. (Closed)
Patch Set: fixed. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // |maxDelayTime|. One is added to handle the case where the actual delay 66 // |maxDelayTime|. One is added to handle the case where the actual delay
67 // equals the maximum delay. 67 // equals the maximum delay.
68 return 1 + AudioUtilities::timeToSampleFrame(maxDelayTime, sampleRate); 68 return 1 + AudioUtilities::timeToSampleFrame(maxDelayTime, sampleRate);
69 } 69 }
70 70
71 bool AudioDelayDSPKernel::hasSampleAccurateValues() { 71 bool AudioDelayDSPKernel::hasSampleAccurateValues() {
72 return false; 72 return false;
73 } 73 }
74 74
75 void AudioDelayDSPKernel::calculateSampleAccurateValues(float*, size_t) { 75 void AudioDelayDSPKernel::calculateSampleAccurateValues(float*, size_t) {
76 ASSERT_NOT_REACHED(); 76 NOTREACHED();
77 } 77 }
78 78
79 double AudioDelayDSPKernel::delayTime(float sampleRate) { 79 double AudioDelayDSPKernel::delayTime(float sampleRate) {
80 return m_desiredDelayFrames / sampleRate; 80 return m_desiredDelayFrames / sampleRate;
81 } 81 }
82 82
83 void AudioDelayDSPKernel::process(const float* source, 83 void AudioDelayDSPKernel::process(const float* source,
84 float* destination, 84 float* destination,
85 size_t framesToProcess) { 85 size_t framesToProcess) {
86 size_t bufferLength = m_buffer.size(); 86 size_t bufferLength = m_buffer.size();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Account for worst case delay. 162 // Account for worst case delay.
163 // Don't try to track actual delay time which can change dynamically. 163 // Don't try to track actual delay time which can change dynamically.
164 return m_maxDelayTime; 164 return m_maxDelayTime;
165 } 165 }
166 166
167 double AudioDelayDSPKernel::latencyTime() const { 167 double AudioDelayDSPKernel::latencyTime() const {
168 return 0; 168 return 0;
169 } 169 }
170 170
171 } // namespace blink 171 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/audio/AudioBus.cpp ('k') | third_party/WebKit/Source/platform/audio/Distance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698