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