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

Unified Diff: media/audio/audio_parameters.h

Issue 22886005: Switch audio synchronization from sleep() based to select() based. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/audio_parameters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/audio_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698