mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Many quoted local includes had an incorrect ../ depth and resolved to
non-existent files from the including file's directory.
This was easy to miss because normal target include directories and PCH
usage masked some failures, and several stale paths lived in files that
are only compiled in optional test configurations. As a result, the
problem mostly surfaced in stricter or broader fresh builds.
Audit all C++ and header local includes, keep them relative, and adjust
paths so each include resolves to an existing in-tree header. For
headers that were renamed or moved, update includes to their current
relative location instead of switching to include-root form.
A few legacy ERM tests also used dynamic_ptr_cast at call sites where we
had to replace stale headers. The helper/header path they relied on is
no longer present after 81af66d35b, so
those downcasts are now explicit dynamic_cast calls with the same intent.
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
/*
|
|
* ISoundPlayer.h, part of VCMI engine
|
|
*
|
|
* Authors: listed in file AUTHORS in main folder
|
|
*
|
|
* License: GNU General Public License v2.0 or later
|
|
* Full text of license available in license.txt file, in main folder
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include "../../lib/CSoundBase.h"
|
|
#include "../../lib/filesystem/ResourcePath.h"
|
|
|
|
class ISoundPlayer
|
|
{
|
|
public:
|
|
virtual ~ISoundPlayer() = default;
|
|
|
|
virtual int playSound(soundBase::soundID soundID) = 0;
|
|
virtual int playSound(const AudioPath & sound) = 0;
|
|
virtual int playSoundLooped(const AudioPath & sound) = 0;
|
|
virtual int playSound(std::pair<std::unique_ptr<ui8[]>, si64> & data) = 0;
|
|
virtual int playSoundFromSet(std::vector<soundBase::soundID> & sound_vec) = 0;
|
|
virtual void stopSound(int handler) = 0;
|
|
virtual void pauseSound(int handler) = 0;
|
|
virtual void resumeSound(int handler) = 0;
|
|
|
|
virtual ui32 getVolume() const = 0;
|
|
virtual void setVolume(ui32 percent) = 0;
|
|
virtual uint32_t getSoundDurationMilliseconds(const AudioPath & sound) = 0;
|
|
virtual void setCallback(int channel, std::function<void()> function) = 0;
|
|
virtual void resetCallback(int channel) = 0;
|
|
virtual void soundFinishedCallback(int channel) = 0;
|
|
virtual void ambientUpdateChannels(std::map<AudioPath, int> currentSounds) = 0;
|
|
virtual void ambientStopAllChannels() = 0;
|
|
virtual int ambientGetRange() const = 0;
|
|
};
|