Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vector<WavFileRead> VSSEnvironment::GetChannels(string directory)
{
vector<WavFileRead> files;
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontLeft) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(FrontLeft) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontRight) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(FrontRight) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(FrontCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(Lfe) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(Lfe) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(BackLeft) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(BackLeft) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(BackRight) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(BackRight) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontLeftOfCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(FrontLeftOfCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontRightOfCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(FrontRightOfCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(BackCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(BackCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(SideLeft) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(SideLeft) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(SideRight) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(SideRight) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopFrontLeft) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopFrontLeft) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopFrontCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopFrontCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopFrontRight) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopFrontRight) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopBackLeft) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopBackLeft) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopBackCenter) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopBackCenter) + ".wav"));
}
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(TopBackRight) + ".wav"))
{
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(TopBackRight) + ".wav"));
}
vector<string> allFiles = DirectoryTools::GetFiles(directory);
for (int i = 0; i < allFiles.size(); i++)
{
if (allFiles[i].find(ChannelsFunctions::GetFriendlyName(Mono)) != 0 || allFiles[i].find(ChannelsFunctions::GetFriendlyName(Custom)))
{
files.push_back(WavFileRead(allFiles[i]));
}
}
return files;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.