Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
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"
27#include "devices/I3DDevice.h"
29
30#include <list>
31
33
34class SequenceEntry;
35class SequenceData;
36
40class AUD_API Sequence : public ISound
41{
42 friend class SequenceReader;
43private:
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
51public:
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, double begin, double end, double skip);
155
160 void remove(std::shared_ptr<SequenceEntry> entry);
161
167 std::shared_ptr<IReader> createQualityReader(ResampleQuality quality);
168
169 virtual std::shared_ptr<IReader> createReader();
170};
171
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.
ResampleQuality
Resampling algorithm and quality.
Definition Specification.h:88
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:40
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.
AnimateableProperty * getAnimProperty(AnimateablePropertyType type)
Retrieves one of the animated properties of the sound.
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.
void setSpeedOfSound(float speed)
Sets the speed of sound.
virtual std::shared_ptr< IReader > createReader()
Creates a reader for playback of the sound source.
float getDopplerFactor() const
Retrieves the doppler factor.
float getSpeedOfSound() const
Retrieves the speed of sound.
std::shared_ptr< IReader > createQualityReader(ResampleQuality quality)
Creates a new reader with indicated resampling quality.
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.
std::shared_ptr< SequenceEntry > add(std::shared_ptr< ISound > sound, double begin, double end, double skip)
Adds a new entry to the scene.
void setDistanceModel(DistanceModel model)
Sets the distance model.
Specification of a sound source.
Definition Specification.h:119