Commit e4c44cc2 authored by Marina Ciocea's avatar Marina Ciocea Committed by Commit Bot

Refactor GetPreferredAudioParameters from core audio util on Windows

Split GetPreferredAudioParameters functions to improve readability,
move helper functions to unnamed namespace, fix typo.

R=maxmorin@chromium.org, olka@chromium.org

Bug: 774998
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I630e02dc73152eaf662a94ef0e1a4150a8ebcec9
Reviewed-on: https://chromium-review.googlesource.com/743361Reviewed-by: default avatarOlga Sharonova <olka@chromium.org>
Reviewed-by: default avatarMax Morin <maxmorin@chromium.org>
Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512794}
parent 471273c7
......@@ -180,7 +180,7 @@ bool WASAPIAudioOutputStream::Open() {
const int preferred_frames_per_buffer = static_cast<int>(
format_.Format.nSamplesPerSec *
CoreAudioUtil::RefererenceTimeToTimeDelta(device_period)
CoreAudioUtil::ReferenceTimeToTimeDelta(device_period)
.InSecondsF() +
0.5);
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ class MEDIA_EXPORT CoreAudioUtil {
// Converts between reference time to base::TimeDelta.
// One reference-time unit is 100 nanoseconds.
// Example: double s = RefererenceTimeToTimeDelta(t).InMillisecondsF();
static base::TimeDelta RefererenceTimeToTimeDelta(REFERENCE_TIME time);
static base::TimeDelta ReferenceTimeToTimeDelta(REFERENCE_TIME time);
// Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used
// as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment