Changeset View
Changeset View
Standalone View
Standalone View
extern/audaspace/src/sequence/SequenceHandle.h
- This file was moved from intern/audaspace/intern/AUD_SequencerHandle.h.
| /* | /******************************************************************************* | ||||
| * ***** BEGIN GPL LICENSE BLOCK ***** | * Copyright 2009-2016 Jörg Müller | ||||
| * | * | ||||
| * Copyright 2009-2011 Jörg Hermann Müller | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | |||||
| * You may obtain a copy of the License at | |||||
| * | * | ||||
| * This file is part of AudaSpace. | * http://www.apache.org/licenses/LICENSE-2.0 | ||||
| * | * | ||||
| * Audaspace is free software; you can redistribute it and/or modify | * Unless required by applicable law or agreed to in writing, software | ||||
| * it under the terms of the GNU General Public License as published by | * distributed under the License is distributed on an "AS IS" BASIS, | ||||
| * the Free Software Foundation; either version 2 of the License, or | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| * (at your option) any later version. | * See the License for the specific language governing permissions and | ||||
| * | * limitations under the License. | ||||
| * AudaSpace is distributed in the hope that it will be useful, | ******************************************************************************/ | ||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
| * GNU General Public License for more details. | |||||
| * | |||||
| * You should have received a copy of the GNU General Public License | |||||
| * along with Audaspace; if not, write to the Free Software Foundation, | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||||
| * | |||||
| * ***** END GPL LICENSE BLOCK ***** | |||||
| */ | |||||
| /** \file audaspace/intern/AUD_SequencerHandle.h | #pragma once | ||||
| * \ingroup audaspaceintern | |||||
| */ | |||||
| #include "Audaspace.h" | |||||
| #ifndef __AUD_SEQUENCERHANDLE_H__ | #include <memory> | ||||
| #define __AUD_SEQUENCERHANDLE_H__ | |||||
| #include "AUD_SequencerEntry.h" | AUD_NAMESPACE_BEGIN | ||||
| #include "AUD_IHandle.h" | |||||
| #include "AUD_I3DHandle.h" | |||||
| class AUD_ReadDevice; | class ReadDevice; | ||||
| class IHandle; | |||||
| class I3DHandle; | |||||
| class SequenceEntry; | |||||
| /** | /** | ||||
| * Represents a playing sequenced entry. | * Represents a playing sequenced entry. | ||||
| */ | */ | ||||
| class AUD_SequencerHandle | class SequenceHandle | ||||
| { | { | ||||
| private: | private: | ||||
| /// The entry this handle belongs to. | /// The entry this handle belongs to. | ||||
| boost::shared_ptr<AUD_SequencerEntry> m_entry; | std::shared_ptr<SequenceEntry> m_entry; | ||||
| /// The handle in the read device. | /// The handle in the read device. | ||||
| boost::shared_ptr<AUD_IHandle> m_handle; | std::shared_ptr<IHandle> m_handle; | ||||
| /// The 3D handle in the read device. | /// The 3D handle in the read device. | ||||
| boost::shared_ptr<AUD_I3DHandle> m_3dhandle; | std::shared_ptr<I3DHandle> m_3dhandle; | ||||
| /// Whether the sound is playable. | /// Whether the sound is playable. | ||||
| bool m_valid; | bool m_valid; | ||||
| Context not available. | |||||
| int m_sound_status; | int m_sound_status; | ||||
| /// The read device this handle is played on. | /// The read device this handle is played on. | ||||
| AUD_ReadDevice& m_device; | ReadDevice& m_device; | ||||
| // delete copy constructor and operator= | |||||
| SequenceHandle(const SequenceHandle&) = delete; | |||||
| SequenceHandle& operator=(const SequenceHandle&) = delete; | |||||
| /** | /** | ||||
| * Starts playing back the handle. | * Starts playing back the handle. | ||||
| Context not available. | |||||
| * \param entry The entry this handle plays. | * \param entry The entry this handle plays. | ||||
| * \param device The read device to play on. | * \param device The read device to play on. | ||||
| */ | */ | ||||
| AUD_SequencerHandle(boost::shared_ptr<AUD_SequencerEntry> entry, AUD_ReadDevice& device); | SequenceHandle(std::shared_ptr<SequenceEntry> entry, ReadDevice& device); | ||||
| /** | /** | ||||
| * Destroys the handle. | * Destroys the handle. | ||||
| */ | */ | ||||
| ~AUD_SequencerHandle(); | ~SequenceHandle(); | ||||
| /** | /** | ||||
| * Compares whether this handle is playing the same entry as supplied. | * Compares whether this handle is playing the same entry as supplied. | ||||
| * \param entry The entry to compare to. | * \param entry The entry to compare to. | ||||
| * \return Whether the entries ID is smaller, equal or bigger. | * \return Whether the entries ID is smaller, equal or bigger. | ||||
| */ | */ | ||||
| int compare(boost::shared_ptr<AUD_SequencerEntry> entry) const; | int compare(std::shared_ptr<SequenceEntry> entry) const; | ||||
| /** | /** | ||||
| * Stops playing back the handle. | * Stops playing back the handle. | ||||
| Context not available. | |||||
| bool seek(float position); | bool seek(float position); | ||||
| }; | }; | ||||
| #endif //__AUD_SEQUENCERHANDLE_H__ | AUD_NAMESPACE_END | ||||
| Context not available. | |||||