blob: a8c26349a984edfca53dc3ff9dc76cf86fb96f6c [file] [log] [blame]
Glenn Kasten97b5d0d2012-03-23 18:54:19 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "FastMixerState.h"
18
19namespace android {
20
21FastTrack::FastTrack() :
Martin Storsjo3ce28aa2014-02-05 19:49:05 +020022 mBufferProvider(NULL), mVolumeProvider(NULL),
Andy Hunge8a1ced2014-05-09 15:02:21 -070023 mChannelMask(AUDIO_CHANNEL_OUT_STEREO), mFormat(AUDIO_FORMAT_INVALID), mGeneration(0)
Glenn Kasten97b5d0d2012-03-23 18:54:19 -070024{
25}
26
27FastTrack::~FastTrack()
28{
29}
30
Glenn Kastenf7160b52014-03-18 17:01:15 -070031FastMixerState::FastMixerState() : FastThreadState(),
Glenn Kasten22340022014-04-07 12:04:41 -070032 // mFastTracks
Glenn Kasten97b5d0d2012-03-23 18:54:19 -070033 mFastTracksGen(0), mTrackMask(0), mOutputSink(NULL), mOutputSinkGen(0),
Glenn Kasten22340022014-04-07 12:04:41 -070034 mFrameCount(0), mTeeSink(NULL)
Glenn Kasten97b5d0d2012-03-23 18:54:19 -070035{
36}
37
38FastMixerState::~FastMixerState()
39{
40}
41
Glenn Kastend702a562015-03-02 15:51:38 -080042// static
43const char *FastMixerState::commandToString(Command command)
44{
45 const char *str = FastThreadState::commandToString(command);
46 if (str != NULL) {
47 return str;
48 }
49 switch (command) {
50 case FastMixerState::MIX: return "MIX";
51 case FastMixerState::WRITE: return "WRITE";
52 case FastMixerState::MIX_WRITE: return "MIX_WRITE";
53 }
54 LOG_ALWAYS_FATAL("%s", __func__);
55}
56
Glenn Kasten97b5d0d2012-03-23 18:54:19 -070057} // namespace android