1 //////////////////////////////////////////////////////////////////////////////// 2 // Copyright (C) 2004-2011 by The Allacrost Project 3 // Copyright (C) 2012-2016 by Bertram (Valyria Tear) 4 // All Rights Reserved 5 // 6 // This code is licensed under the GNU GPL version 2. It is free software 7 // and you may modify it and/or redistribute it under the terms of this license. 8 // See http://www.gnu.org/copyleft/gpl.html for details. 9 //////////////////////////////////////////////////////////////////////////////// 10 11 /** **************************************************************************** 12 *** \file audio_effects.h 13 *** \author Mois�s Ferrer Serra, byaku@allacrost.org 14 *** \author Yohann Ferreira, yohann ferreira orange fr 15 *** \brief Header file for audio effects 16 *** 17 *** This code provides the interface for effects, as well as the private classes 18 *** used for build all the audio fx system 19 *** 20 *** \todo Add an effect class that modifies an audio's position over time, 21 *** which will allow support for panning effects 22 *** ***************************************************************************/ 23 24 #ifndef __AUDIO_EFFECTS_HEADER__ 25 #define __AUDIO_EFFECTS_HEADER__ 26 27 #include "audio_descriptor.h" 28 29 namespace vt_audio 30 { 31 32 class AudioDescriptor; 33 34 enum AUDIO_EFFECT { 35 AUDIO_EFFECT_NONE = 0 36 }; 37 38 namespace private_audio 39 { 40 41 /** **************************************************************************** 42 *** \brief An abstract base class for all audio effects to be derived from 43 *** 44 *** The purpose of this class is nothing more than to provide a simple common 45 *** interface for all audio effects, primarily so that they may be stored in 46 *** the same container. Most effects will only operate upon a single piece of 47 *** audio, but some effects may operate across multiple audio descriptors. 48 *** ***************************************************************************/ 49 class AudioEffect 50 { 51 public: AudioEffect()52 AudioEffect() : 53 active(true), 54 effect_type(AUDIO_EFFECT_NONE) 55 {} 56 ~AudioEffect()57 virtual ~AudioEffect() 58 {} 59 60 //! \brief Set to true while an effect is active, and set to false when the effect is finished 61 bool active; 62 63 //! \brief Updates the effect and sets the active member to false when the effect is finished 64 virtual void Update() = 0; 65 66 //! \brief Get the audio descriptor concerned by the effect. 67 virtual AudioDescriptor &GetAudioDescriptor() const = 0; 68 69 //! The audio effect type 70 AUDIO_EFFECT effect_type; 71 }; // class AudioEffect 72 73 // NOTE: No actual effect is existing for now. 74 75 } // namespace private_audio 76 77 } // namespace vt_audio 78 79 #endif // __AUDIO_EFFECTS_HEADER__ 80