| Index: media/audio/audio_thread.cc
|
| diff --git a/media/audio/audio_thread.cc b/media/audio/audio_thread.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7c701d31bf90bae1674228e6147011c58d71b385
|
| --- /dev/null
|
| +++ b/media/audio/audio_thread.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "media/audio/audio_thread.h"
|
| +
|
| +#include "base/lazy_instance.h"
|
| +
|
| +static base::LazyInstance<media::AudioThread> g_thread =
|
| + LAZY_INSTANCE_INITIALIZER;
|
| +
|
| +namespace media {
|
| +
|
| +AudioThread::AudioThread() : thread_("Audio") {
|
| +#if defined(OS_WIN)
|
| + thread_.init_com_with_mta(true);
|
| +#endif
|
| + CHECK(thread_.Start());
|
| +}
|
| +
|
| +// static
|
| +base::Thread* AudioThread::Get() {
|
| + return &(g_thread.Get().thread_);
|
| +}
|
| +
|
| +} // namespace media
|
|
|