Index: media/audio/audio_parameters.h |
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h |
index bc629a7db0033adb3a475e8a2f5d0e98bd5b438a..9b86d31186a7c2d33f6f0388b36a344f0855cd97 100644 |
--- a/media/audio/audio_parameters.h |
+++ b/media/audio/audio_parameters.h |
@@ -6,6 +6,7 @@ |
#define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
#include "base/basictypes.h" |
+#include "base/time/time.h" |
#include "media/base/channel_layout.h" |
#include "media/base/media_export.h" |
@@ -69,6 +70,10 @@ class MEDIA_EXPORT AudioParameters { |
// Returns the number of bytes representing a frame of audio. |
int GetBytesPerFrame() const; |
+ // Returns the duration of this buffer as calculated from frames_per_buffer() |
+ // and sample_rate(). |
+ base::TimeDelta GetBufferDuration() const; |
+ |
Format format() const { return format_; } |
ChannelLayout channel_layout() const { return channel_layout_; } |
int sample_rate() const { return sample_rate_; } |