Commit be88dcb0 authored by Anne Heimes's avatar Anne Heimes

debuggen des fehlers mit der riesen größe für ankommende daten...

parent e54c7168
......@@ -67,12 +67,12 @@ public:
int GetNetStreamBlocklength() const;
int GetNetStreamNumberOfChannels() const;
double GetNetStreamSampleRate() const;
//! Enabled/disables export of loggers
void SetDebuggingEnabled( bool bEnabled );
//! Logging export flag getter
//! Enabled/disables export of loggers
void SetDebuggingEnabled( bool bEnabled );
//! Logging export flag getter
bool GetIsDebuggingEnabled() const;
int GetSendingBlockLength() const;
......
......@@ -130,6 +130,7 @@ void CITANetAudioMessage::WriteMessage()
// rewrite size dummy
iSwapDummy = m_oOutgoing.GetBufferSize() - sizeof( VistaType::sint32 );
oLog.nMessagePayloadSize = iSwapDummy;
if( m_oOutgoing.GetByteorderSwapFlag() )
VistaSerializingToolset::Swap4( &iSwapDummy );
std::memcpy( pBuffer, &iSwapDummy, sizeof( VistaType::sint32 ) );
......@@ -154,6 +155,8 @@ void CITANetAudioMessage::WriteMessage()
oLog.sAction = "write_message";
oLog.dInternalProcessingTime = ITAClock::getDefaultClock()->getTime() - dInTime;
m_pMessageLogger->log( oLog );
std::cout << GetMessageLoggerBaseName() << " Write: Groesse:" << oLog.nMessagePayloadSize << " MsgType:" << oLog.sMessageType << " MsgID: " << oLog.uiBlockId << std::endl;
#if NET_AUDIO_SHOW_TRAFFIC
vstr::out() << "CITANetAudioMessage [ Writing] " << m_nMessageType << " (id=" << std::setw( 4 ) << m_nMessageId << ")" << std::endl;
#endif
......@@ -212,6 +215,8 @@ bool CITANetAudioMessage::ReadMessage( int timeout )
// we need at least the two protocol ints
//assert( nMessagePayloadSize >= 2 * sizeof( VistaType::sint32 ) );
std::cout << GetMessageLoggerBaseName() << " Read: " << nMessagePayloadSize << std::endl;
if( nMessagePayloadSize > ( int ) m_vecIncomingBuffer.size() )
m_vecIncomingBuffer.resize( nMessagePayloadSize );
......@@ -237,6 +242,8 @@ bool CITANetAudioMessage::ReadMessage( int timeout )
m_oIncoming.SetBuffer( &m_vecIncomingBuffer[ 0 ], nMessagePayloadSize, false );
m_nMessageType = ReadInt();
m_nMessageId = ReadInt();
std::cout << GetMessageLoggerBaseName() << " Read: MsgType:" << m_nMessageType << " MsgID: " << m_nMessageId << std::endl;
oLog.sMessageType = CITANetAudioProtocol::GetNPMessageID( m_nMessageType );
oLog.uiBlockId = m_nMessageId;
oLog.dWorldTimeStamp = ITAClock::getDefaultClock()->getTime() - dInTime;
......@@ -460,6 +467,7 @@ void CITANetAudioMessage::SetMessageLoggerBaseName( const std::string& sBaseName
assert( !sBaseName.empty() );
if( m_pMessageLogger )
m_pMessageLogger->setOutputFile( sBaseName + ".log" );
m_sMessageLoggerBaseName = sBaseName;
}
std::string CITANetAudioMessage::GetMessageLoggerBaseName() const
......
......@@ -14,11 +14,11 @@
using namespace std;
string g_sServerName = "localhost";
string g_sServerName = "137.226.61.85";
int g_iServerPort = 12480;
double g_dSampleRate = 44100.0;
int g_iBlockLength = 512;
int g_iChannels = 2;
int g_iBlockLength = 32;
int g_iChannels = 100;
int g_iTargetLatencySamples = 2 * g_iBlockLength; // 1.4512ms
int g_iRingBufferSize = 2 * g_iTargetLatencySamples;
int g_iSendingBlockLength = 8;
......
......@@ -23,14 +23,15 @@ const static string g_sServerName = "localhost";
const static string g_sInputFilePath = "gershwin-mono.wav";
const static int g_iServerPort = 12480;
const static double g_dSampleRate = 44100;
const static int g_iBlockLength = 512;
const static int g_iChannels = 2;
const static int g_iTargetLatencySamples = g_iBlockLength * 1;
const static int g_iRingerBufferCapacity = g_iBlockLength * 5;
const static int g_iBlockLength = 32;
const static int g_iChannels = 100;
const static int g_iTargetLatencySamples = g_iBlockLength * 10;
const static int g_iRingerBufferCapacity = g_iBlockLength * 20;
const static double g_dDuration = 10.0f;
const static double g_dSyncTimout = 0.001f;
const static double g_dSyncTimout = 0.01f;
const static bool g_bUseASIO = true;
const static string g_sAudioInterface = "ASIO4ALL v2";
const static string g_sAudioInterface = "ASIO MADIface USB";
//const static string g_sAudioInterface = "ASIO4ALL v2";
//const static string g_sAudioInterface = "ASIO Hammerfall DSP";
const static bool g_bUseUDP = false;
......@@ -48,8 +49,8 @@ public:
pInputFile->SetIsLooping( true );
assert( pInputFile->GetNumberOfChannels() == 1 );
pMuliplier = new ITAStreamMultiplier1N( pInputFile, g_iChannels );
pInputStreamProbe = new ITAStreamProbe( pMuliplier, "ITANetAudioTest.serverstream.wav" );
pStreamingServer->SetInputStream( pInputStreamProbe );
//pInputStreamProbe = new ITAStreamProbe( pMuliplier, "ITANetAudioTest.serverstream.wav" );
pStreamingServer->SetInputStream(pMuliplier);
Run();
};
......
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