-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from Laguna1989/feature/soundfades
Improve Sound Fades
- Loading branch information
Showing
61 changed files
with
252 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
impl/jamtemplate/common/audio/fades/logging_sound_fade_manager.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "logging_sound_fade_manager.hpp" | ||
|
||
jt::LoggingSoundFadeManager::LoggingSoundFadeManager( | ||
SoundFadeManagerInterface& decoratee, LoggerInterface& logger) | ||
: m_decoratee { decoratee } | ||
, m_logger { logger } | ||
{ | ||
} | ||
|
||
void jt::LoggingSoundFadeManager::volumeFade(std::weak_ptr<SoundInterface> sound, | ||
float durationInSeconds, float startVolume, float endVolume) | ||
{ | ||
m_logger.info("Create sound fade", { "jt", "audio", "sound fade" }); | ||
m_decoratee.volumeFade(sound, durationInSeconds, startVolume, endVolume); | ||
} | ||
|
||
void jt::LoggingSoundFadeManager::update(float elapsed) { | ||
m_logger.verbose("sound fade manager update", { "jt", "audio", "sound fade" }); | ||
m_decoratee.update(elapsed); } | ||
|
||
size_t jt::LoggingSoundFadeManager::size() const { | ||
m_logger.verbose("sound fade manager size", { "jt", "audio", "sound fade" }); | ||
return m_decoratee.size(); } |
24 changes: 24 additions & 0 deletions
24
impl/jamtemplate/common/audio/fades/logging_sound_fade_manager.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef JAMTEMPLATE_LOGGING_SOUND_FADE_MANAGER_HPP | ||
#define JAMTEMPLATE_LOGGING_SOUND_FADE_MANAGER_HPP | ||
|
||
#include <audio/fades/sound_fade_manager_interface.hpp> | ||
#include <log/logger_interface.hpp> | ||
|
||
namespace jt { | ||
|
||
class LoggingSoundFadeManager : public jt::SoundFadeManagerInterface { | ||
public: | ||
LoggingSoundFadeManager(SoundFadeManagerInterface& decoratee, LoggerInterface& logger); | ||
void volumeFade(std::weak_ptr<SoundInterface> sound, float durationInSeconds, float startVolume, | ||
float endVolume) override; | ||
void update(float elapsed) override; | ||
size_t size() const override; | ||
|
||
private: | ||
SoundFadeManagerInterface& m_decoratee; | ||
LoggerInterface& m_logger; | ||
}; | ||
|
||
} // namespace jt | ||
|
||
#endif // JAMTEMPLATE_LOGGING_SOUND_FADE_MANAGER_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
...template/common/audio/sound_fade_info.hpp → ...te/common/audio/fades/sound_fade_info.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.