Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITADataSources
Commits
b3f9d3d1
Commit
b3f9d3d1
authored
Apr 11, 2017
by
Jonas Stienen
Browse files
Fixing merge stupidity
parent
c283da2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ITANetAudioStreamingServer.h
View file @
b3f9d3d1
...
...
@@ -29,80 +29,6 @@
#include
<string>
#include
<vector>
#include
<iostream>
<<<<<<<<<
Temporary
merge
branch
1
#include
<fstream>
#include
<ITANetAudioProtocol.h>
#include
<VistaInterProcComm/Concurrency/VistaThreadLoop.h>
#include
<ITASampleFrame.h>
class
ITADatasource
;
class
CITANetAudioMessage
;
class
CITANetAudioProtocol
;
class
CITANetAudioServer
;
class
CITANetAudioMessage
;
class
VistaTCPSocket
;
//! Network audio sample server (for connecting a net audio stream)
/**
* Audio sample transmitter for a networked signal source that can connect via TCP/IP.
*
* \sa CITANetAudioStream
* \note not thread-safe
*/
class
ITA_DATA_SOURCES_API
CITANetAudioStreamingServer
:
public
VistaThreadLoop
{
public:
enum
UpdateStrategy
{
AUTO
=
1
,
//!< Automatic update rate based on sample rate and block length of client (default)
ADAPTIVE
,
//!< Adaptive update rate, adjusts for drifting clocks
CONSTANT
,
//!< Set a user-defined update rate (may cause forced pausing of sample feeding or dropouts on client side)
};
CITANetAudioStreamingServer
();
virtual
~
CITANetAudioStreamingServer
()
{};
bool
Start
(
const
std
::
string
&
sAddress
,
int
iPort
);
bool
IsClientConnected
()
const
;
std
::
string
GetNetworkAddress
()
const
;
int
GetNetworkPort
()
const
;
bool
LoopBody
();
void
Stop
();
void
SetInputStream
(
ITADatasource
*
pInStream
);
int
GetNetStreamBlocklength
()
const
;
int
GetNetStreamNumberOfChannels
()
const
;
double
GetNetStreamSampleRate
()
const
;
void
SetAutomaticUpdateRate
();
protected:
ITADatasource
*
GetInputStream
()
const
;
private:
CITANetAudioServer
*
m_pNetAudioServer
;
ITASampleFrame
m_sfTempTransmitBuffer
;
ITADatasource
*
m_pInputStream
;
VistaConnectionIP
*
m_pConnection
;
CITANetAudioProtocol
::
StreamingParameters
m_oServerParams
;
CITANetAudioMessage
*
m_pIncomingMessage
;
CITANetAudioMessage
*
m_pOutgoingMessage
;
int
m_iUpdateStrategy
;
int
m_iClientRingBufferFreeSamples
;
friend
class
CITANetAudioServer
;
};
#endif // INCLUDE_WATCHER_ITA_NET_AUDIO_STREAMING_SERVER
=========
#include
<fstream>
class
ITADatasource
;
class
CITANetAudioMessage
;
...
...
tests/NetAudio/ITANetAudioTest.cpp
View file @
b3f9d3d1
...
...
@@ -31,7 +31,7 @@ const static int g_iTargetLatencySamples = g_iBlockLength * 4;
const
static
int
g_iRingerBufferCapacity
=
g_iBlockLength
*
10
;
const
static
double
g_dDuration
=
10.0
f
;
const
static
double
g_dSyncTimout
=
0.001
f
;
const
static
bool
g_bUseASIO
=
true
;
static
bool
g_bUseASIO
=
true
;
//const static string g_sAudioInterface = "ASIO MADIface USB";
//const static string g_sAudioInterface = "ASIO4ALL v2";
const
static
string
g_sAudioInterface
=
"ASIO Hammerfall DSP"
;
...
...
@@ -44,7 +44,7 @@ public:
:
CITASampleProcessor
(
g_iChannels
,
g_dSampleRate
,
g_iBlockLength
)
{};
inline
void
Process
(
const
ITAStreamInfo
*
pStreamInfo
)
inline
void
Process
(
const
ITAStreamInfo
*
)
{
for
(
size_t
c
=
0
;
c
<
m_vvfSampleBuffer
.
size
();
c
++
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment