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

Side by Side Diff: Source/platform/audio/HRTFElevation.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/HRTFElevation.h ('k') | Source/platform/audio/HRTFKernel.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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 23 matching lines...) Expand all
34 34
35 #include <math.h> 35 #include <math.h>
36 #include <algorithm> 36 #include <algorithm>
37 #include "platform/audio/AudioBus.h" 37 #include "platform/audio/AudioBus.h"
38 #include "platform/audio/HRTFPanner.h" 38 #include "platform/audio/HRTFPanner.h"
39 #include "wtf/ThreadingPrimitives.h" 39 #include "wtf/ThreadingPrimitives.h"
40 #include "wtf/text/StringHash.h" 40 #include "wtf/text/StringHash.h"
41 41
42 using namespace std; 42 using namespace std;
43 43
44 namespace WebCore { 44 namespace blink {
45 45
46 const unsigned HRTFElevation::AzimuthSpacing = 15; 46 const unsigned HRTFElevation::AzimuthSpacing = 15;
47 const unsigned HRTFElevation::NumberOfRawAzimuths = 360 / AzimuthSpacing; 47 const unsigned HRTFElevation::NumberOfRawAzimuths = 360 / AzimuthSpacing;
48 const unsigned HRTFElevation::InterpolationFactor = 8; 48 const unsigned HRTFElevation::InterpolationFactor = 8;
49 const unsigned HRTFElevation::NumberOfTotalAzimuths = NumberOfRawAzimuths * Inte rpolationFactor; 49 const unsigned HRTFElevation::NumberOfTotalAzimuths = NumberOfRawAzimuths * Inte rpolationFactor;
50 50
51 // Total number of components of an HRTF database. 51 // Total number of components of an HRTF database.
52 const size_t TotalNumberOfResponses = 240; 52 const size_t TotalNumberOfResponses = 240;
53 53
54 // Number of frames in an individual impulse response. 54 // Number of frames in an individual impulse response.
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 int azimuthIndex2 = (azimuthIndex + 1) % numKernels; 331 int azimuthIndex2 = (azimuthIndex + 1) % numKernels;
332 double frameDelay2L = m_kernelListL->at(azimuthIndex2)->frameDelay(); 332 double frameDelay2L = m_kernelListL->at(azimuthIndex2)->frameDelay();
333 double frameDelay2R = m_kernelListR->at(azimuthIndex2)->frameDelay(); 333 double frameDelay2R = m_kernelListR->at(azimuthIndex2)->frameDelay();
334 334
335 // Linearly interpolate delays. 335 // Linearly interpolate delays.
336 frameDelayL = (1.0 - azimuthBlend) * frameDelayL + azimuthBlend * frameDelay 2L; 336 frameDelayL = (1.0 - azimuthBlend) * frameDelayL + azimuthBlend * frameDelay 2L;
337 frameDelayR = (1.0 - azimuthBlend) * frameDelayR + azimuthBlend * frameDelay 2R; 337 frameDelayR = (1.0 - azimuthBlend) * frameDelayR + azimuthBlend * frameDelay 2R;
338 } 338 }
339 339
340 } // namespace WebCore 340 } // namespace blink
341 341
342 #endif // ENABLE(WEB_AUDIO) 342 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/platform/audio/HRTFElevation.h ('k') | Source/platform/audio/HRTFKernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698