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

Side by Side Diff: Source/modules/webaudio/AnalyserNode.h

Issue 212793002: Fix attributes types on AnalyserNode as specification of web audio. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add compatibility.js Created 6 years, 8 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // AudioNode 45 // AudioNode
46 virtual void process(size_t framesToProcess) OVERRIDE; 46 virtual void process(size_t framesToProcess) OVERRIDE;
47 47
48 // Javascript bindings 48 // Javascript bindings
49 unsigned fftSize() const { return m_analyser.fftSize(); } 49 unsigned fftSize() const { return m_analyser.fftSize(); }
50 void setFftSize(unsigned size, ExceptionState&); 50 void setFftSize(unsigned size, ExceptionState&);
51 51
52 unsigned frequencyBinCount() const { return m_analyser.frequencyBinCount(); } 52 unsigned frequencyBinCount() const { return m_analyser.frequencyBinCount(); }
53 53
54 void setMinDecibels(float k, ExceptionState&); 54 void setMinDecibels(double k, ExceptionState&);
55 float minDecibels() const { return m_analyser.minDecibels(); } 55 double minDecibels() const { return m_analyser.minDecibels(); }
56 56
57 void setMaxDecibels(float k, ExceptionState&); 57 void setMaxDecibels(double k, ExceptionState&);
58 float maxDecibels() const { return m_analyser.maxDecibels(); } 58 double maxDecibels() const { return m_analyser.maxDecibels(); }
59 59
60 void setSmoothingTimeConstant(float k, ExceptionState&); 60 void setSmoothingTimeConstant(double k, ExceptionState&);
61 float smoothingTimeConstant() const { return m_analyser.smoothingTimeConstan t(); } 61 double smoothingTimeConstant() const { return m_analyser.smoothingTimeConsta nt(); }
62 62
63 void getFloatFrequencyData(Float32Array* array) { m_analyser.getFloatFrequen cyData(array); } 63 void getFloatFrequencyData(Float32Array* array) { m_analyser.getFloatFrequen cyData(array); }
64 void getByteFrequencyData(Uint8Array* array) { m_analyser.getByteFrequencyDa ta(array); } 64 void getByteFrequencyData(Uint8Array* array) { m_analyser.getByteFrequencyDa ta(array); }
65 void getFloatTimeDomainData(Float32Array* array) { m_analyser.getFloatTimeDo mainData(array); } 65 void getFloatTimeDomainData(Float32Array* array) { m_analyser.getFloatTimeDo mainData(array); }
66 void getByteTimeDomainData(Uint8Array* array) { m_analyser.getByteTimeDomain Data(array); } 66 void getByteTimeDomainData(Uint8Array* array) { m_analyser.getByteTimeDomain Data(array); }
67 private: 67 private:
68 virtual double tailTime() const OVERRIDE { return 0; } 68 virtual double tailTime() const OVERRIDE { return 0; }
69 virtual double latencyTime() const OVERRIDE { return 0; } 69 virtual double latencyTime() const OVERRIDE { return 0; }
70 70
71 AnalyserNode(AudioContext*, float sampleRate); 71 AnalyserNode(AudioContext*, float sampleRate);
72 72
73 RealtimeAnalyser m_analyser; 73 RealtimeAnalyser m_analyser;
74 }; 74 };
75 75
76 } // namespace WebCore 76 } // namespace WebCore
77 77
78 #endif // AnalyserNode_h 78 #endif // AnalyserNode_h
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/realtimeanalyser-basic-expected.txt ('k') | Source/modules/webaudio/AnalyserNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698