Chromium Code Reviews| Index: media/audio/pulse/pulse_output.cc |
| diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc |
| index f86860571a03fca4390c4149704888b5c3630d55..1b431397be3529fb9b6cf5dceeb16a0ccfa3dd6b 100644 |
| --- a/media/audio/pulse/pulse_output.cc |
| +++ b/media/audio/pulse/pulse_output.cc |
| @@ -12,6 +12,7 @@ |
| #include "media/audio/audio_device_description.h" |
| #include "media/audio/audio_manager_base.h" |
| #include "media/audio/pulse/pulse_util.h" |
| +#include "media/base/audio_sample_types.h" |
| namespace media { |
| @@ -146,8 +147,13 @@ void PulseAudioOutputStream::FulfillWriteRequest(size_t requested_bytes) { |
| // Note: If this ever changes to output raw float the data must be clipped |
| // and sanitized since it may come from an untrusted source such as NaCl. |
| audio_bus_->Scale(volume_); |
| +#if 0 |
| audio_bus_->ToInterleaved( |
| audio_bus_->frames(), params_.bits_per_sample() / 8, buffer); |
| +#else |
| + audio_bus_->ToInterleaved<Float32SampleTypeTraits>( |
| + audio_bus_->frames(), reinterpret_cast<float*>(buffer)); |
|
DaleCurtis
2016/11/01 18:51:37
is buffer allocated correctly?
|
| +#endif |
| } else { |
| memset(buffer, 0, bytes_to_fill); |
| } |