Audaspace  1.3.0
A high level audio library.
Sequence.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright 2009-2016 Jörg Müller
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 #pragma once
18 
25 #include "ISound.h"
26 #include "respec/Specification.h"
27 #include "devices/I3DDevice.h"
29 
30 #include <list>
31 
33 
34 class SequenceEntry;
35 class SequenceData;
36 
40 class AUD_API Sequence : public ISound
41 {
42  friend class SequenceReader;
43 private:
45  std::shared_ptr<SequenceData> m_sequence;
46 
47  // delete copy constructor and operator=
48  Sequence(const Sequence&) = delete;
49  Sequence& operator=(const Sequence&) = delete;
50 
51 public:
58  Sequence(Specs specs, float fps, bool muted);
59 
64  Specs getSpecs();
65 
70  void setSpecs(Specs specs);
71 
76  float getFPS() const;
77 
82  void setFPS(float fps);
83 
88  void mute(bool muted);
89 
94  bool isMuted() const;
95 
101  float getSpeedOfSound() const;
102 
108  void setSpeedOfSound(float speed);
109 
116  float getDopplerFactor() const;
117 
124  void setDopplerFactor(float factor);
125 
130  DistanceModel getDistanceModel() const;
131 
136  void setDistanceModel(DistanceModel model);
137 
144  AnimateableProperty* getAnimProperty(AnimateablePropertyType type);
145 
154  std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip);
155 
160  void remove(std::shared_ptr<SequenceEntry> entry);
161 
166  std::shared_ptr<IReader> createQualityReader();
167 
168  virtual std::shared_ptr<IReader> createReader();
169 };
170 
This reader plays back sequenced entries.
Definition: SequenceReader.h:36
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
virtual Specs getSpecs() const
Returns the specification of the reader.
The ISound interface.
#define AUD_API
Used for exporting symbols in the shared library.
Definition: Audaspace.h:93
Defines all important macros and basic data structures for stream format descriptions.
Specification of a sound source.
Definition: Specification.h:109
This class saves animation data for float properties.
Definition: AnimateableProperty.h:46
This class represents a type of sound source and saves the necessary values for it.
Definition: ISound.h:39
Defines the AnimateableProperty class as well as existing property types.
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
virtual std::shared_ptr< IReader > createReader()=0
Creates a reader for playback of the sound source.
Defines the I3DDevice interface as well as the different distance models.
AnimateablePropertyType
Possible animatable properties for Sequencer Factories and Entries.
Definition: AnimateableProperty.h:34
This sound represents sequenced entries to play a sound scene.
Definition: Sequence.h:40
DistanceModel
Possible distance models for the 3D device.
Definition: I3DDevice.h:34
This class represents sequenced entries to play a sound scene.
Definition: SequenceData.h:42
This class represents a sequenced entry in a sequencer sound.
Definition: SequenceEntry.h:38