1 /* 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 #ifndef STATIC_AUDIO_TRACK_STATE_H 18 #define STATIC_AUDIO_TRACK_STATE_H 19 20 namespace android { 21 22 // Represents a single state of an AudioTrack that was created in static mode (shared memory buffer 23 // supplied by the client). This state needs to be communicated from the client to server. As this 24 // state is too large to be updated atomically without a mutex, and mutexes aren't allowed here, the 25 // state is wrapped by a SingleStateQueue. 26 struct StaticAudioTrackState { 27 // do not define constructors, destructors, or virtual methods 28 size_t mLoopStart; 29 size_t mLoopEnd; 30 int mLoopCount; 31 }; 32 33 } // namespace android 34 35 #endif // STATIC_AUDIO_TRACK_STATE_H 36