blob: be9cb57c544b5c69bf4123936f9fbf8ffc9d388b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (c) 2012 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_output_dispatcher.h"
#include "base/message_loop.h"
namespace media {
AudioOutputDispatcher::AudioOutputDispatcher(
AudioManager* audio_manager,
const AudioParameters& params)
: audio_manager_(audio_manager),
message_loop_(base::MessageLoop::current()),
params_(params) {
// We expect to be instantiated on the audio thread. Otherwise the
// message_loop_ member will point to the wrong message loop!
DCHECK(audio_manager->GetMessageLoop()->BelongsToCurrentThread());
}
AudioOutputDispatcher::~AudioOutputDispatcher() {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
}
} // namespace media
|