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 
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 
131 
137 
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 
Defines the AnimateableProperty class as well as existing property types.
AnimateablePropertyType
Possible animatable properties for Sequencer Factories and Entries.
Definition: AnimateableProperty.h:35
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition: Audaspace.h:93
Defines the I3DDevice interface as well as the different distance models.
DistanceModel
Possible distance models for the 3D device.
Definition: I3DDevice.h:35
The ISound interface.
Defines all important macros and basic data structures for stream format descriptions.
This class saves animation data for float properties.
Definition: AnimateableProperty.h:47
This class represents a type of sound source and saves the necessary values for it.
Definition: ISound.h:40
This class represents sequenced entries to play a sound scene.
Definition: SequenceData.h:43
This class represents a sequenced entry in a sequencer sound.
Definition: SequenceEntry.h:39
This reader plays back sequenced entries.
Definition: SequenceReader.h:37
This sound represents sequenced entries to play a sound scene.
Definition: Sequence.h:41
void mute(bool muted)
Sets the muting state of the scene.
void remove(std::shared_ptr< SequenceEntry > entry)
Removes an entry from the scene.
virtual std::shared_ptr< IReader > createReader()
Creates a reader for playback of the sound source.
float getFPS() const
Retrieves the scene's FPS.
void setDopplerFactor(float factor)
Sets the doppler factor.
void setSpecs(Specs specs)
Sets the audio output specification.
AnimateableProperty * getAnimProperty(AnimateablePropertyType type)
Retrieves one of the animated properties of the sound.
void setSpeedOfSound(float speed)
Sets the speed of sound.
float getDopplerFactor() const
Retrieves the doppler factor.
std::shared_ptr< SequenceEntry > add(std::shared_ptr< ISound > sound, float begin, float end, float skip)
Adds a new entry to the scene.
float getSpeedOfSound() const
Retrieves the speed of sound.
std::shared_ptr< IReader > createQualityReader()
Creates a new reader with high quality resampling.
bool isMuted() const
Retrieves the muting state of the scene.
Specs getSpecs()
Retrieves the audio output specification.
void setFPS(float fps)
Sets the scene's FPS.
DistanceModel getDistanceModel() const
Retrieves the distance model.
Sequence(Specs specs, float fps, bool muted)
Creates a new sound scene.
void setDistanceModel(DistanceModel model)
Sets the distance model.
Specification of a sound source.
Definition: Specification.h:110