Skip to content
GitLab
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
81a58b72
Commit
81a58b72
authored
Dec 19, 2016
by
Anne
Browse files
struct erstellt, für InitData streaming server
parent
ab5dd839
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ITANetAudioStreamingServer.h
View file @
81a58b72
...
...
@@ -81,11 +81,13 @@ private:
friend
class
CITANetAudioServer
;
// TODO: in nem Struct speichern
int
m_iClientChannels
;
int
m_iClientRingBufferSize
;
int
m_iClientBufferSize
;
double
m_dClientSampleRate
;
// TODO: in einem Struct speichern
struct
InitData
{
int
iClientChannels
;
int
iClientRingBufferSize
;
int
iClientBufferSize
;
double
dClientSampleRate
;
}
m_initData
;
};
#endif // INCLUDE_WATCHER_ITA_NET_AUDIO_STREAMING_SERVER
src/ITANetAudioStreamingServer.cpp
View file @
81a58b72
...
...
@@ -33,6 +33,17 @@ bool CITANetAudioStreamingServer::Start(const std::string& sAddress, int iPort)
if
(
m_pNetAudioServer
->
Start
(
sAddress
,
iPort
))
{
m_pSocket
=
m_pNetAudioServer
->
GetSocket
();
// TODO: Init neu mit Netmessage
long
nIncomingBytes
=
m_pSocket
->
WaitForIncomingData
(
0
);
int
iBytesReceived
=
m_pSocket
->
ReceiveRaw
(
&
m_initData
,
sizeof
(
InitData
));
m_iClientRingBufferFreeSamples
=
m_iClientRingBufferFreeSamples
;
int
iMessageID
=
1
;
m_pSocket
->
SendRaw
(
&
iMessageID
,
sizeof
(
int
));
Run
();
return
true
;
return
true
;
}
return
false
;
...
...
@@ -90,5 +101,5 @@ ITADatasource* CITANetAudioStreamingServer::GetInputStream() const
int
CITANetAudioStreamingServer
::
Transmit
(
const
ITASampleFrame
&
sfNewSamples
,
int
iNumSamples
)
{
return
1
;
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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