Renaming signal sources special methods and moving on to signal source buffers instead of audiofile

parent 80dfbd66
This diff is collapsed.
......@@ -20,7 +20,6 @@
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <string>
const double DECIBEL_MINUS_INFINITY = -1.5E-308;
......@@ -402,81 +401,3 @@ const std::vector<CVAIntLiteral>& IVACore::GetLiterals()
return g_oCoreLiterals;
}
void IVACore::StartMachineSignalSource( const std::string& sSignalSourceID )
{
CVAStruct oParams;
oParams[ "set" ] = "action";
oParams[ "value" ] = "start";
SetSignalSourceParameters( sSignalSourceID, oParams );
}
void IVACore::HaltMachineSignalSource( const std::string& sSignalSourceID )
{
CVAStruct oParams;
oParams[ "set" ] = "action";
oParams[ "value" ] = "stop";
SetSignalSourceParameters( sSignalSourceID, oParams );
}
std::string IVACore::GetMachineSignalSourceStateStr( const std::string& sSignalSourceID ) const
{
CVAStruct oParams, oRet;
oParams[ "get" ] = "state";
oRet = GetSignalSourceParameters( sSignalSourceID, oParams );
if( oRet.HasKey( "state" ) )
if( oRet[ "state" ].IsString() )
return oRet[ "state" ].ToString();
else
return "error";
else
return "unkown";
}
void IVACore::SetMachineSignalSourceSpeed( const std::string& sSignalSourceID, double dSpeed )
{
CVAStruct oParams;
oParams[ "set" ] = "S";
oParams[ "value" ] = dSpeed;
SetSignalSourceParameters( sSignalSourceID, oParams );
}
double IVACore::GetMachineSignalSourceSpeed( const std::string& sSignalSourceID ) const
{
CVAStruct oParams, oRet;
oParams[ "get" ] = "speed";
oRet = GetSignalSourceParameters( sSignalSourceID, oParams );
if( oRet.HasKey( "speed" ) )
if( oRet[ "speed" ].IsNumeric() )
return double( oRet[ "speed" ] );
return 1.0f;
}
void IVACore::SetMachineSignalSourceStartFile( const std::string& sSignalSourceID, const std::string& sFilePath )
{
CVAStruct oParams;
oParams[ "set" ] = "StartSoundFilePath";
oParams[ "value" ] = sFilePath;
SetSignalSourceParameters( sSignalSourceID, oParams );
}
void IVACore::SetMachineSignalSourceIdleFile( const std::string& sSignalSourceID, const std::string& sFilePath )
{
CVAStruct oParams;
oParams[ "set" ] = "IdleSoundFilePath";
oParams[ "value" ] = sFilePath;
SetSignalSourceParameters( sSignalSourceID, oParams );
}
void IVACore::SetMachineSignalSourceStopFile( const std::string& sSignalSourceID, const std::string& sFilePath )
{
CVAStruct oParams;
oParams[ "set" ] = "StopSoundFilePath";
oParams[ "value" ] = sFilePath;
SetSignalSourceParameters( sSignalSourceID, oParams );
}
void IVACore::RemoveSoundSourceSignalSource( const int iID )
{
SetSoundSourceSignalSource( iID, "" );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment