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

Unified Diff: media/base/audio_bus.h

Issue 2469023002: Support floating-point audio output for Linux (Closed)
Patch Set: Implement correctly Created 4 years, 1 month 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
Index: media/base/audio_bus.h
diff --git a/media/base/audio_bus.h b/media/base/audio_bus.h
index 6d381ccac3daa3c9325fb9d4af99259e4cef3825..f254cb8006543c127881e5ef83815ec327a48dfe 100644
--- a/media/base/audio_bus.h
+++ b/media/base/audio_bus.h
@@ -151,6 +151,10 @@ class MEDIA_EXPORT AudioBus {
int dest_start_frame,
AudioBus* dest) const;
+ // Clamp the data in the bus to the range [-1, 1]. NaN is mapped to
+ // 0 (arbitrarily).
+ void Clamp();
+
// Returns a raw pointer to the requested channel. Pointer is guaranteed to
// have a 16-byte alignment. Warning: Do not rely on having sane (i.e. not
// inf, nan, or between [-1.0, 1.0]) values in the channel data.

Powered by Google App Engine
This is Rietveld 408576698