Commit 028c1643 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Some fixes and comments

parent fdc504a7
......@@ -12,7 +12,7 @@
#
# WARNING: This configuration file for the VACore has been automatically created by CMake.
# You can move this file and change the argument path accordingly, otherwise
# your changes will will be overwritten. Alternatively, you can directly modify
# your changes will be overwritten. Alternatively, you can directly modify
# the prototype file 'VACore.ini.proto' and re-run CMake.
#
......@@ -111,7 +111,7 @@ Buffersize = AUTO
[Renderer:MyBinauralFreeField]
Class = BinauralFreeField
Enabled = false
Enabled = true
Outputs = MyTalkthroughHeadphones
HRIRFilterLength = 256
MotionModelNumHistoryKeys = 10000
......@@ -147,7 +147,7 @@ SpeedOfSound = 344.0
[Renderer:MyBinauralRoomAcoustics]
Class = BinauralRoomAcoustics
Enabled = true
Enabled = false
Outputs = MyTalkthroughHeadphones
# Setup options: Local, Remote, Hybrid
Setup = Local
......
......@@ -233,7 +233,7 @@ std::string CVAAudioSignalSourceManager::CreateSequencerSignalSource(const std::
std::string CVAAudioSignalSourceManager::CreateNetstreamSignalSource( const std::string& sBindAddress, int iRecvPort, const std::string& sName )
{
// Datei-Quellen sind immer managed und dynamisch
// Netstream audio sources are managed
CVANetstreamSignalSource* pSource = new CVANetstreamSignalSource( m_dSamplerate, m_iBlocklength, sBindAddress, iRecvPort );
return RegisterSignalSource( pSource, sName, true, true );
}
......@@ -321,7 +321,7 @@ CVASignalSourceInfo CVAAudioSignalSourceManager::GetSignalSourceInfo( const std:
RecordMapCit it = FindSignalSource( sID );
if( it == m_mRecords.end() );
if( it == m_mRecords.end() )
{
m_csRecords.leave();
ITA_EXCEPT1( INVALID_PARAMETER, "Could not get information on " + sID + ", audio signal source not found" );
......@@ -445,6 +445,8 @@ void CVAAudioSignalSourceManager::SyncSignalSources() {
// Dies geschieht wenn die Audio-Hardware im Sack ist und nicht streamt.
// In diesem Falle wird hier unendlich gewartet.
// [jst]: @todo This code block needs an update. The while( true ) loop appears unnecessary.
if( ( m_iStreamCounter != iEntryCount ) || ( iEntryCount == 0 ) )
return;
......
#include "VANetstreamSignalSource.h"
#include <VAException.h>
#include "../VAAudiostreamTracker.h"
#include <ITANetAudioStream.h>
#include "../VAAudiostreamTracker.h"
#include <ITAException.h>
#include <sstream>
CVANetstreamSignalSource::CVANetstreamSignalSource( double dDestinationSamplerate, int iBlocklength, const std::string& sBindAddress, int iRecvPort )
CVANetstreamSignalSource::CVANetstreamSignalSource( const double dDestinationSampleRate, const int iBlockLength, const std::string& sBindAddress, const int iRecvPort )
: m_pAssociatedCore( NULL )
{
m_pSourceStream = new CITANetAudioStream( 1, dDestinationSamplerate, iBlocklength, 12 * iBlocklength );
m_pSourceStream = new CITANetAudioStream( 1, dDestinationSampleRate, iBlockLength, 12 * iBlockLength );
if( !m_pSourceStream->Connect( sBindAddress, iRecvPort ) )
VA_EXCEPT2( INVALID_PARAMETER, "Could not connect to network audio streaming server or connection refused (parameter mismatch?)" );
try
{
if( !m_pSourceStream->Connect( sBindAddress, iRecvPort ) )
VA_EXCEPT2( INVALID_PARAMETER, "Could not connect to network audio streaming server or connection refused (parameter mismatch?)" );
}
catch( ITAException& e )
{
throw CVAException( CVAException::INVALID_PARAMETER, "Netstream signal source setup failed: " + e.ToString() );
}
}
CVANetstreamSignalSource::~CVANetstreamSignalSource()
......
......@@ -15,13 +15,17 @@ class ITADatasource;
class CVANetstreamSignalSource : public IVAAudioSignalSource
{
public:
//! Create a signal source that connects to a network streaming server
/**
* \param dDestinationSamplerate Abtastrate die vorrausgesetzt wird
* \param iBlocklength Streaming-Blocklnge [Samples]
* \param sBindAddress Netzwerk-Adresse an den gebunden wird
* \param iRecvPort Eingangsport auf dem gelauscht wird.
* @param[in] dDestinationSampleRate Match sampling rate
* @param[in] iBlockLength Matching streaming block length
* @param[in] sBindAddress Network bind address
* @param[in] iRecvPort Network bind port number
*
* @note Throws CVAException!
*
*/
CVANetstreamSignalSource( double dDestinationSamplerate, int iBlocklength, const std::string& sBindAddress, int iRecvPort );
CVANetstreamSignalSource( const double dDestinationSampleRate, const int iBlockLength, const std::string& sBindAddress, const int iRecvPort );
virtual ~CVANetstreamSignalSource();
......@@ -34,11 +38,11 @@ public:
inline int GetType() const { return VA_SS_NETSTREAM; };
const float* GetStreamBlock( const CVAAudiostreamState* pStreamInfo );
CVAStruct GetParameters( const CVAStruct& ) const { return CVAStruct(); };
virtual void SetParameters( const CVAStruct& ) {};
inline CVAStruct GetParameters( const CVAStruct& ) const { return CVAStruct(); };
inline virtual void SetParameters( const CVAStruct& ) {};
private:
IVACore* m_pAssociatedCore; //!< TODO needed?
IVACore* m_pAssociatedCore;
CITANetAudioStream* m_pSourceStream;
void HandleRegistration( IVACore* pParentCore );
......
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