1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Make audio work

Includes some reorganization and cleanup
This commit is contained in:
Florian Meißner
2014-10-26 22:54:37 +01:00
parent 9de5c4db54
commit 7cd8f51eb4
11 changed files with 214 additions and 235 deletions

View File

@ -12,6 +12,11 @@ include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${PYTHON_INCLUDE_DIR})
include_directories(${CURL_INCLUDE_DIR})
if (VIDEO_AVAILABLE)
include_directories(${VPX_INCLUDE_DIR})
include_directories(${Opus_INCLUDE_DIR})
endif (VIDEO_AVAILABLE)
# Test for Python Interpreter, which will be used for extra build scripts if available
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
@ -161,15 +166,15 @@ target_link_libraries(plClient ${Ogg_LIBRARIES})
target_link_libraries(plClient ${Vorbis_LIBRARIES})
target_link_libraries(plClient ${DirectX_LIBRARIES})
target_link_libraries(plClient ${CURL_LIBRARY})
target_link_libraries(plClient ${Opus_LIBRARIES})
if(USE_VLD)
target_link_libraries(plClient ${VLD_LIBRARY})
endif()
if (VPX_AVAILABLE)
if (VIDEO_AVAILABLE)
target_link_libraries(plClient ${VPX_LIBRARY})
endif (VPX_AVAILABLE)
target_link_libraries(plClient ${Opus_LIBRARIES})
endif (VIDEO_AVAILABLE)
if (WIN32)
target_link_libraries(plClient rpcrt4)

View File

@ -825,18 +825,18 @@ bool plClient::IHandleMovieMsg(plMovieMsg* mov)
if (mov->GetFileName().IsEmpty())
return true;
int i = fMovies.GetCount();
size_t i = fMovies.size();
if (!(mov->GetCmd() & plMovieMsg::kMake))
{
for (i = 0; i < fMovies.GetCount(); i++)
for (i = 0; i < fMovies.size(); i++)
{
if (mov->GetFileName().CompareI(fMovies[i]->GetFileName().AsString()) == 0)
break;
}
}
if (i == fMovies.GetCount())
if (i == fMovies.size())
{
fMovies.Append(new plMoviePlayer);
fMovies.push_back(new plMoviePlayer());
fMovies[i]->SetFileName(mov->GetFileName());
}
@ -892,7 +892,8 @@ bool plClient::IHandleMovieMsg(plMovieMsg* mov)
if (!fMovies[i]->GetFileName().IsValid())
{
delete fMovies[i];
fMovies.Remove(i);
fMovies[i] = fMovies.back();
fMovies.pop_back();
}
return true;
}
@ -1827,13 +1828,13 @@ bool plClient::IDraw()
void plClient::IServiceMovies()
{
int i;
for (i = 0; i < fMovies.GetCount(); i++)
for (size_t i = 0; i < fMovies.size(); i++)
{
if (!fMovies[i]->NextFrame())
{
delete fMovies[i];
fMovies.Remove(i);
fMovies[i] = fMovies.back();
fMovies.pop_back();
i--;
}
}
@ -1841,9 +1842,9 @@ void plClient::IServiceMovies()
void plClient::IKillMovies()
{
for (int i = 0; i < fMovies.GetCount(); i++)
for (size_t i = 0; i < fMovies.size(); i++)
delete fMovies[i];
fMovies.Reset();
fMovies.clear();
}
bool plClient::IPlayIntroMovie(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume /* = 1.0 */)

View File

@ -147,7 +147,7 @@ protected:
int fQuality;
bool fQuitIntro;
hsTArray<plMoviePlayer*> fMovies;
std::vector<plMoviePlayer*> fMovies;
plMessagePumpProc fMessagePumpProc;