Changeset View
Changeset View
Standalone View
Standalone View
extern/audaspace/include/sequence/Sequence.h
- This file was moved from intern/audaspace/intern/AUD_SequencerFactory.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_SequencerFactory.h | |||||
| * \ingroup audaspaceintern | |||||
| */ | |||||
| #pragma once | |||||
| #ifndef __AUD_SEQUENCERFACTORY_H__ | /** | ||||
| #define __AUD_SEQUENCERFACTORY_H__ | * @file Sequence.h | ||||
| * @ingroup sequence | |||||
| * The Sequence class. | |||||
| */ | |||||
| #include "AUD_IFactory.h" | #include "ISound.h" | ||||
| #include "AUD_AnimateableProperty.h" | #include "respec/Specification.h" | ||||
| //#include "AUD_ILockable.h" | #include "devices/I3DDevice.h" | ||||
| #include "AUD_Sequencer.h" | #include "sequence/AnimateableProperty.h" | ||||
| #include <list> | #include <list> | ||||
| #include <pthread.h> | |||||
| class AUD_SequencerEntry; | AUD_NAMESPACE_BEGIN | ||||
| class SequenceEntry; | |||||
| class SequenceData; | |||||
| /** | /** | ||||
| * This factory represents sequenced entries to play a sound scene. | * This sound represents sequenced entries to play a sound scene. | ||||
| */ | */ | ||||
| class AUD_SequencerFactory : public AUD_IFactory//, public AUD_ILockable | class AUD_API Sequence : public ISound | ||||
| { | { | ||||
| friend class AUD_SequencerReader; | friend class SequenceReader; | ||||
| private: | private: | ||||
| /// The sequence. | /// The sequence. | ||||
| boost::shared_ptr<AUD_Sequencer> m_sequence; | std::shared_ptr<SequenceData> m_sequence; | ||||
| // hide copy constructor and operator= | // delete copy constructor and operator= | ||||
| AUD_SequencerFactory(const AUD_SequencerFactory&); | Sequence(const Sequence&) = delete; | ||||
| AUD_SequencerFactory& operator=(const AUD_SequencerFactory&); | Sequence& operator=(const Sequence&) = delete; | ||||
| public: | public: | ||||
| /** | /** | ||||
| Context not available. | |||||
| * \param fps The FPS of the scene. | * \param fps The FPS of the scene. | ||||
| * \param muted Whether the whole scene is muted. | * \param muted Whether the whole scene is muted. | ||||
| */ | */ | ||||
| AUD_SequencerFactory(AUD_Specs specs, float fps, bool muted); | Sequence(Specs specs, float fps, bool muted); | ||||
| #if 0 | |||||
| /** | /** | ||||
| * Locks the factory. | * Retrieves the audio output specification. | ||||
| * \return The specification. | |||||
| */ | */ | ||||
| virtual void lock(); | Specs getSpecs(); | ||||
| /** | /** | ||||
| * Unlocks the previously locked factory. | * Sets the audio output specification. | ||||
| * \param specs The new specification. | |||||
| */ | */ | ||||
| virtual void unlock(); | void setSpecs(Specs specs); | ||||
| #endif | |||||
| /** | /** | ||||
| * Sets the audio output specification. | * Retrieves the scene's FPS. | ||||
| * \param specs The new specification. | * \return The scene's FPS. | ||||
| */ | */ | ||||
| void setSpecs(AUD_Specs specs); | float getFPS() const; | ||||
| /** | /** | ||||
| * Sets the scene's FPS. | * Sets the scene's FPS. | ||||
| Context not available. | |||||
| * Retrieves the muting state of the scene. | * Retrieves the muting state of the scene. | ||||
| * \return Whether the scene is muted. | * \return Whether the scene is muted. | ||||
| */ | */ | ||||
| bool getMute() const; | bool isMuted() const; | ||||
| /** | /** | ||||
| * Retrieves the speed of sound. | * Retrieves the speed of sound. | ||||
| Context not available. | |||||
| * Retrieves the distance model. | * Retrieves the distance model. | ||||
| * \return The distance model. | * \return The distance model. | ||||
| */ | */ | ||||
| AUD_DistanceModel getDistanceModel() const; | DistanceModel getDistanceModel() const; | ||||
| /** | /** | ||||
| * Sets the distance model. | * Sets the distance model. | ||||
| * \param model distance model. | * \param model distance model. | ||||
| */ | */ | ||||
| void setDistanceModel(AUD_DistanceModel model); | void setDistanceModel(DistanceModel model); | ||||
| /** | /** | ||||
| * Retrieves one of the animated properties of the factory. | * Retrieves one of the animated properties of the sound. | ||||
| * \param type Which animated property to retrieve. | * \param type Which animated property to retrieve. | ||||
| * \return A pointer to the animated property, valid as long as the | * \return A pointer to the animated property, valid as long as the | ||||
| * factory is. | * sound is. | ||||
| */ | */ | ||||
| AUD_AnimateableProperty* getAnimProperty(AUD_AnimateablePropertyType type); | AnimateableProperty* getAnimProperty(AnimateablePropertyType type); | ||||
| /** | /** | ||||
| * Adds a new entry to the scene. | * Adds a new entry to the scene. | ||||
| Context not available. | |||||
| * \param skip How much seconds should be skipped at the beginning. | * \param skip How much seconds should be skipped at the beginning. | ||||
| * \return The entry added. | * \return The entry added. | ||||
| */ | */ | ||||
| boost::shared_ptr<AUD_SequencerEntry> add(boost::shared_ptr<AUD_IFactory> sound, float begin, float end, float skip); | std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip); | ||||
| /** | /** | ||||
| * Removes an entry from the scene. | * Removes an entry from the scene. | ||||
| * \param entry The entry to remove. | * \param entry The entry to remove. | ||||
| */ | */ | ||||
| void remove(boost::shared_ptr<AUD_SequencerEntry> entry); | void remove(std::shared_ptr<SequenceEntry> entry); | ||||
| /** | /** | ||||
| * Creates a new reader with high quality resampling. | * Creates a new reader with high quality resampling. | ||||
| * \return The new reader. | * \return The new reader. | ||||
| */ | */ | ||||
| boost::shared_ptr<AUD_IReader> createQualityReader(); | std::shared_ptr<IReader> createQualityReader(); | ||||
| virtual boost::shared_ptr<AUD_IReader> createReader(); | virtual std::shared_ptr<IReader> createReader(); | ||||
| }; | }; | ||||
| #endif //__AUD_SEQUENCERFACTORY_H__ | AUD_NAMESPACE_END | ||||
| Context not available. | |||||