LCOV - code coverage report
Current view: top level - source/soundmanager/items - ISoundItem.h (source / functions) Hit Total Coverage
Test: 0 A.D. test coverage report Lines: 0 2 0.0 %
Date: 2023-01-19 00:18:29 Functions: 0 3 0.0 %

          Line data    Source code
       1             : /* Copyright (C) 2021 Wildfire Games.
       2             :  * This file is part of 0 A.D.
       3             :  *
       4             :  * 0 A.D. is free software: you can redistribute it and/or modify
       5             :  * it under the terms of the GNU General Public License as published by
       6             :  * the Free Software Foundation, either version 2 of the License, or
       7             :  * (at your option) any later version.
       8             :  *
       9             :  * 0 A.D. is distributed in the hope that it will be useful,
      10             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :  * GNU General Public License for more details.
      13             :  *
      14             :  * You should have received a copy of the GNU General Public License
      15             :  * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
      16             :  */
      17             : 
      18             : #ifndef INCLUDED_ISOUNDITEM_H
      19             : #define INCLUDED_ISOUNDITEM_H
      20             : 
      21             : #include "lib/config2.h"
      22             : 
      23             : #if CONFIG2_AUDIO
      24             : 
      25             : #include "maths/Vector3D.h"
      26             : #include "ps/CStr.h"
      27             : #include "soundmanager/data/SoundData.h"
      28             : 
      29           0 : class ISoundItem
      30             : {
      31             : 
      32             : public:
      33           0 :     virtual ~ISoundItem(){};
      34             :     virtual bool GetLooping() = 0;
      35             :     virtual void SetLooping(bool loop) = 0;
      36             :     virtual bool IsPlaying() = 0;
      37             : 
      38             : 
      39             :     virtual const Path GetName() = 0;
      40             :     virtual bool IdleTask() = 0;
      41             :     virtual bool IsFading() = 0;
      42             :     virtual bool Finished() = 0;
      43             : 
      44             :     virtual void Play() = 0;
      45             :     virtual void Stop() = 0;
      46             : 
      47             :     virtual void Attach(CSoundData* itemData) = 0;
      48             : 
      49             :     virtual void EnsurePlay() = 0;
      50             : 
      51             :     virtual void PlayAndDelete() = 0;
      52             :     virtual void StopAndDelete() = 0;
      53             :     virtual void FadeToIn(float newVolume, double fadeDuration) = 0;
      54             :     virtual void FadeAndDelete(double fadeTime) = 0;
      55             :     virtual void FadeAndPause(double fadeTime) = 0;
      56             :     virtual void PlayLoop() = 0;
      57             : 
      58             :     virtual void SetCone(float innerCone, float outerCone, float coneGain) = 0;
      59             :     virtual void SetPitch(float pitch) = 0;
      60             :     virtual void SetGain(float gain) = 0;
      61             :     virtual void SetLocation(const CVector3D& position) = 0;
      62             :     virtual void SetRollOff(float gain, float minDist, float maxDist) = 0;
      63             : 
      64             :     virtual void Pause() = 0;
      65             :     virtual void Resume() = 0;
      66             : };
      67             : 
      68             : #endif // CONFIG2_AUDIO
      69             : 
      70             : #endif // INCLUDED_ISOUNDITEM_H

Generated by: LCOV version 1.13