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

Side by Side Diff: Source/platform/audio/HRTFPanner.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/audio/HRTFPanner.h ('k') | Source/platform/audio/MultiChannelResampler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 #include "platform/audio/HRTFPanner.h" 29 #include "platform/audio/HRTFPanner.h"
30 30
31 #include <algorithm> 31 #include <algorithm>
32 #include "platform/audio/AudioBus.h" 32 #include "platform/audio/AudioBus.h"
33 #include "platform/audio/HRTFDatabase.h" 33 #include "platform/audio/HRTFDatabase.h"
34 #include "wtf/MathExtras.h" 34 #include "wtf/MathExtras.h"
35 #include "wtf/RefPtr.h" 35 #include "wtf/RefPtr.h"
36 36
37 using namespace std; 37 using namespace std;
38 38
39 namespace WebCore { 39 namespace blink {
40 40
41 // The value of 2 milliseconds is larger than the largest delay which exists in any HRTFKernel from the default HRTFDatabase (0.0136 seconds). 41 // The value of 2 milliseconds is larger than the largest delay which exists in any HRTFKernel from the default HRTFDatabase (0.0136 seconds).
42 // We ASSERT the delay values used in process() with this value. 42 // We ASSERT the delay values used in process() with this value.
43 const double MaxDelayTimeSeconds = 0.002; 43 const double MaxDelayTimeSeconds = 0.002;
44 44
45 const int UninitializedAzimuth = -1; 45 const int UninitializedAzimuth = -1;
46 const unsigned RenderingQuantum = 128; 46 const unsigned RenderingQuantum = 128;
47 47
48 HRTFPanner::HRTFPanner(float sampleRate, HRTFDatabaseLoader* databaseLoader) 48 HRTFPanner::HRTFPanner(float sampleRate, HRTFDatabaseLoader* databaseLoader)
49 : Panner(PanningModelHRTF) 49 : Panner(PanningModelHRTF)
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return MaxDelayTimeSeconds + (fftSize() / 2) / static_cast<double>(sampleRat e()); 301 return MaxDelayTimeSeconds + (fftSize() / 2) / static_cast<double>(sampleRat e());
302 } 302 }
303 303
304 double HRTFPanner::latencyTime() const 304 double HRTFPanner::latencyTime() const
305 { 305 {
306 // The latency of a FFTConvolver is also fftSize() / 2, and is in addition t o its tailTime of the 306 // The latency of a FFTConvolver is also fftSize() / 2, and is in addition t o its tailTime of the
307 // same value. 307 // same value.
308 return (fftSize() / 2) / static_cast<double>(sampleRate()); 308 return (fftSize() / 2) / static_cast<double>(sampleRate());
309 } 309 }
310 310
311 } // namespace WebCore 311 } // namespace blink
312 312
313 #endif // ENABLE(WEB_AUDIO) 313 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/platform/audio/HRTFPanner.h ('k') | Source/platform/audio/MultiChannelResampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698