| Index: third_party/WebKit/Source/platform/audio/HRTFElevation.h
|
| diff --git a/third_party/WebKit/Source/platform/audio/HRTFElevation.h b/third_party/WebKit/Source/platform/audio/HRTFElevation.h
|
| index 988a204ffc70c0961b163d1654d52f489deb546a..f3786c3d1ad86f762e35448179fd556fe4682027 100644
|
| --- a/third_party/WebKit/Source/platform/audio/HRTFElevation.h
|
| +++ b/third_party/WebKit/Source/platform/audio/HRTFElevation.h
|
| @@ -32,12 +32,11 @@
|
| #include "platform/audio/HRTFKernel.h"
|
| #include "wtf/Allocator.h"
|
| #include "wtf/Noncopyable.h"
|
| -#include "wtf/OwnPtr.h"
|
| -#include "wtf/PassOwnPtr.h"
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/RefPtr.h"
|
| #include "wtf/text/CString.h"
|
| #include "wtf/text/WTFString.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -51,10 +50,10 @@ public:
|
| // Normally, there will only be a single HRTF database set, but this API supports the possibility of multiple ones with different names.
|
| // Interpolated azimuths will be generated based on InterpolationFactor.
|
| // Valid values for elevation are -45 -> +90 in 15 degree increments.
|
| - static PassOwnPtr<HRTFElevation> createForSubject(const String& subjectName, int elevation, float sampleRate);
|
| + static std::unique_ptr<HRTFElevation> createForSubject(const String& subjectName, int elevation, float sampleRate);
|
|
|
| // Given two HRTFElevations, and an interpolation factor x: 0 -> 1, returns an interpolated HRTFElevation.
|
| - static PassOwnPtr<HRTFElevation> createByInterpolatingSlices(HRTFElevation* hrtfElevation1, HRTFElevation* hrtfElevation2, float x, float sampleRate);
|
| + static std::unique_ptr<HRTFElevation> createByInterpolatingSlices(HRTFElevation* hrtfElevation1, HRTFElevation* hrtfElevation2, float x, float sampleRate);
|
|
|
| // Returns the list of left or right ear HRTFKernels for all the azimuths going from 0 to 360 degrees.
|
| HRTFKernelList* kernelListL() { return m_kernelListL.get(); }
|
| @@ -84,10 +83,10 @@ public:
|
| // Valid values for azimuth are 0 -> 345 in 15 degree increments.
|
| // Valid values for elevation are -45 -> +90 in 15 degree increments.
|
| // Returns true on success.
|
| - static bool calculateKernelsForAzimuthElevation(int azimuth, int elevation, float sampleRate, const String& subjectName, OwnPtr<HRTFKernel>& kernelL, OwnPtr<HRTFKernel>& kernelR);
|
| + static bool calculateKernelsForAzimuthElevation(int azimuth, int elevation, float sampleRate, const String& subjectName, std::unique_ptr<HRTFKernel>& kernelL, std::unique_ptr<HRTFKernel>& kernelR);
|
|
|
| private:
|
| - HRTFElevation(PassOwnPtr<HRTFKernelList> kernelListL, PassOwnPtr<HRTFKernelList> kernelListR, int elevation, float sampleRate)
|
| + HRTFElevation(std::unique_ptr<HRTFKernelList> kernelListL, std::unique_ptr<HRTFKernelList> kernelListR, int elevation, float sampleRate)
|
| : m_kernelListL(std::move(kernelListL))
|
| , m_kernelListR(std::move(kernelListR))
|
| , m_elevationAngle(elevation)
|
| @@ -95,8 +94,8 @@ private:
|
| {
|
| }
|
|
|
| - OwnPtr<HRTFKernelList> m_kernelListL;
|
| - OwnPtr<HRTFKernelList> m_kernelListR;
|
| + std::unique_ptr<HRTFKernelList> m_kernelListL;
|
| + std::unique_ptr<HRTFKernelList> m_kernelListR;
|
| double m_elevationAngle;
|
| float m_sampleRate;
|
| };
|
|
|