Chromium Code Reviews| Index: services/media/framework/stream_type.h |
| diff --git a/services/media/framework/stream_type.h b/services/media/framework/stream_type.h |
| index aaa313602e41db5f1afe49e006799f1cc7febccc..d13e00450f245be05c560dfc2952f41d667cd671 100644 |
| --- a/services/media/framework/stream_type.h |
| +++ b/services/media/framework/stream_type.h |
| @@ -271,7 +271,13 @@ class LpcmStreamType : public StreamType { |
| } |
| uint64_t min_buffer_size(uint64_t frame_count) const { |
| - return frame_count * sample_size_ * channels_; |
| + return frame_count * bytes_per_frame(); |
| + } |
| + |
| + uint64_t frame_count(uint64_t size) const { |
| + DCHECK(size % bytes_per_frame() == 0); |
| + DCHECK(bytes_per_frame() != 0); |
|
johngro
2016/03/21 19:47:56
the DCHECK which checks bytes_per_frame should com
dalesat
2016/03/21 22:30:58
Done.
|
| + return size / bytes_per_frame(); |
| } |
| static uint32_t SampleSizeFromFormat(SampleFormat sample_format); |