Index: content/renderer/media/audio_device.h |
=================================================================== |
--- content/renderer/media/audio_device.h (revision 110480) |
+++ content/renderer/media/audio_device.h (working copy) |
@@ -101,9 +101,6 @@ |
double sample_rate() const { return sample_rate_; } |
size_t buffer_size() const { return buffer_size_; } |
- static double GetAudioHardwareSampleRate(); |
- static size_t GetAudioHardwareBufferSize(); |
- |
// Methods called on IO thread ---------------------------------------------- |
// AudioMessageFilter::Delegate methods, called by AudioMessageFilter. |
virtual void OnRequestPacket(AudioBuffersState buffers_state); |
@@ -175,4 +172,26 @@ |
DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDevice); |
}; |
+// Contains static methods to query hardware properties from the browser |
henrika (OOO until Aug 14)
2011/11/17 12:27:44
Namespace perhaps?
|
+// process. Values are cached to avoid unnecessary round trips, but the cache |
+// can be cleared if needed (currently only used by tests). |
+class CONTENT_EXPORT AudioHardware { |
+ public: |
+ static double GetOutputSampleRate(); |
+ static double GetInputSampleRate(); |
+ static size_t GetOutputBufferSize(); |
+ |
+ // Forces the next call to any of the Get functions to query the hardware |
+ // and repopulate the cache. |
+ static void ResetCache(); |
+ |
+ private: |
+ static double output_sample_rate_; |
+ static double input_sample_rate_; |
+ static size_t output_buffer_size_; |
+ |
+ // This class doesn't support construction. |
+ DISALLOW_COPY_AND_ASSIGN(AudioHardware); |
+}; |
+ |
#endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ |