Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Core/GameEngine/Include/Common/GameAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ class AudioManager : public SubsystemInterface
// For the file cache to know when to remove files.
Comment thread
xezon marked this conversation as resolved.
virtual void closeAnySamplesUsingFile( const void *fileToClose ) = 0;

virtual Bool isMusicAlreadyLoaded() const;

Bool getDisallowSpeech() const { return m_disallowSpeech; }
void setDisallowSpeech( Bool disallowSpeech ) { m_disallowSpeech = disallowSpeech; }

Expand Down
27 changes: 0 additions & 27 deletions Core/GameEngine/Source/Common/Audio/GameAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,33 +944,6 @@ Real AudioManager::getAudioLengthMS( const AudioEventRTS *event )
getFileLengthMS(tmpEvent.getDecayFilename());
}

//-------------------------------------------------------------------------------------------------
Bool AudioManager::isMusicAlreadyLoaded() const
{
const AudioEventInfo *musicToLoad = nullptr;
AudioEventInfoHash::const_iterator it;
for (it = m_allAudioEventInfo.begin(); it != m_allAudioEventInfo.end(); ++it) {
if (it->second) {
const AudioEventInfo *aet = it->second;
if (aet->m_soundType == AT_Music) {
musicToLoad = aet;
}
}
}

if (!musicToLoad) {
return FALSE;
}

AudioEventRTS aud;
aud.setAudioEventInfo(musicToLoad);
aud.generateFilename();

AsciiString astr = aud.getFilename();

return (TheFileSystem->doesFileExist(astr.str()));
}

//-------------------------------------------------------------------------------------------------
void AudioManager::findAllAudioEventsOfType( AudioType audioType, std::vector<AudioEventInfo*>& allEvents )
{
Expand Down
2 changes: 0 additions & 2 deletions Generals/Code/GameEngine/Source/Common/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,6 @@ void GameEngine::init()
initSubsystem(TheGlobalLanguageData,"TheGlobalLanguageData",MSGNEW("GameEngineSubsystem") GlobalLanguage, nullptr); // must be before the game text
TheGlobalLanguageData->parseCustomDefinition();
initSubsystem(TheAudio,"TheAudio", createAudioManager(TheGlobalData->m_headless), nullptr);
if (!TheAudio->isMusicAlreadyLoaded())
setQuitting(TRUE);

#if RTS_ZEROHOUR && RETAIL_COMPATIBLE_CRC
TheNameKeyGenerator->syncNameKeyID();
Expand Down
3 changes: 0 additions & 3 deletions Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,6 @@ BOOL CWorldBuilderApp::InitInstance()

initSubsystem(TheScriptEngine, (ScriptEngine*)(new ScriptEngine()));
initSubsystem(TheAudio, (AudioManager*)new MilesAudioManager());
if (!TheAudio->isMusicAlreadyLoaded())
return FALSE;

initSubsystem(TheVideoPlayer, (VideoPlayerInterface*)(new VideoPlayer()));
initSubsystem(TheModuleFactory, (ModuleFactory*)(new W3DModuleFactory()));
initSubsystem(TheSidesList, new SidesList());
Expand Down
2 changes: 0 additions & 2 deletions GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ void GameEngine::init()
DEBUG_LOG(("%s", Buf));////////////////////////////////////////////////////////////////////////////
#endif/////////////////////////////////////////////////////////////////////////////////////////////
initSubsystem(TheAudio,"TheAudio", createAudioManager(TheGlobalData->m_headless), nullptr);
if (!TheAudio->isMusicAlreadyLoaded())
setQuitting(TRUE);

#if RTS_ZEROHOUR && RETAIL_COMPATIBLE_CRC
TheNameKeyGenerator->syncNameKeyID();
Expand Down
3 changes: 0 additions & 3 deletions GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,6 @@ BOOL CWorldBuilderApp::InitInstance()
ini.loadFileDirectory( "Data\\Scripts\\Scripts", INI_LOAD_OVERWRITE, nullptr );

initSubsystem(TheAudio, (AudioManager*)new MilesAudioManager());
if (!TheAudio->isMusicAlreadyLoaded())
return FALSE;

initSubsystem(TheVideoPlayer, (VideoPlayerInterface*)(new VideoPlayer()));
initSubsystem(TheModuleFactory, (ModuleFactory*)(new W3DModuleFactory()));
initSubsystem(TheSidesList, new SidesList());
Expand Down
Loading