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
4f46d4d7
Commit
4f46d4d7
authored
Dec 15, 2016
by
Dipl.-Ing. Jonas Stienen
Browse files
Compiling and linking net audio tests
parent
75f6836b
Changes
9
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
4f46d4d7
...
@@ -52,7 +52,6 @@ set( ITADataSourcesHeader
...
@@ -52,7 +52,6 @@ set( ITADataSourcesHeader
"include/ITAPeakDetector.h"
"include/ITAPeakDetector.h"
"include/ITARMSDetector.h"
"include/ITARMSDetector.h"
"include/ITAStreamAmplifier.h"
"include/ITAStreamAmplifier.h"
#"include/ITAStreamFilter.h"
"include/ITAStreamFunctionGenerator.h"
"include/ITAStreamFunctionGenerator.h"
"include/ITAStreamModalSynthesizer.h"
"include/ITAStreamModalSynthesizer.h"
"include/ITAStreamMultiplier1N.h"
"include/ITAStreamMultiplier1N.h"
...
@@ -70,10 +69,10 @@ set( ITADataSourcesSources
...
@@ -70,10 +69,10 @@ set( ITADataSourcesSources
"src/ITAFileDataSink.cpp"
"src/ITAFileDataSink.cpp"
"src/ITAFileDataSource.cpp"
"src/ITAFileDataSource.cpp"
"src/ITANetAudioStream.cpp"
"src/ITANetAudioStream.cpp"
"src/ITANetAudioSampleServer.cpp"
"src/ITAPeakDetector.cpp"
"src/ITAPeakDetector.cpp"
"src/ITARMSDetector.cpp"
"src/ITARMSDetector.cpp"
"src/ITAStreamAmplifier.cpp"
"src/ITAStreamAmplifier.cpp"
#"src/ITAStreamFilter.cpp"
"src/ITAStreamFunctionGenerator.cpp"
"src/ITAStreamFunctionGenerator.cpp"
"src/ITAStreamModalSynthesizer.cpp"
"src/ITAStreamModalSynthesizer.cpp"
"src/ITAStreamMultiplier1N.cpp"
"src/ITAStreamMultiplier1N.cpp"
...
...
include/ITANetAudioSampleServer.h
View file @
4f46d4d7
...
@@ -39,8 +39,16 @@ class CITANetAudioStreamServer;
...
@@ -39,8 +39,16 @@ class CITANetAudioStreamServer;
class
ITA_DATA_SOURCES_API
CITANetAudioSampleServer
class
ITA_DATA_SOURCES_API
CITANetAudioSampleServer
{
{
public:
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)
};
CITANetAudioSampleServer
();
CITANetAudioSampleServer
();
virtual
~
CITANetAudioSampleServer
();
virtual
~
CITANetAudioSampleServer
()
{}
;
bool
Start
(
const
std
::
string
&
sAddress
,
int
iPort
);
bool
Start
(
const
std
::
string
&
sAddress
,
int
iPort
);
bool
IsClientConnected
()
const
;
bool
IsClientConnected
()
const
;
...
@@ -54,14 +62,19 @@ public:
...
@@ -54,14 +62,19 @@ public:
int
GetNetStreamNumberOfChannels
()
const
;
int
GetNetStreamNumberOfChannels
()
const
;
double
GetNetStreamSampleRate
()
const
;
double
GetNetStreamSampleRate
()
const
;
void
SetAutomaticUpdateRate
();
protected:
protected:
int
Transmit
(
const
ITASampleFrame
&
sfNewSamples
,
int
iNumSamples
);
int
Transmit
(
const
ITASampleFrame
&
sfNewSamples
,
int
iNumSamples
);
ITADatasource
*
GetInputStream
()
const
;
private:
private:
CITANetAudioStreamServer
*
m_pNetAudioServer
;
CITANetAudioStreamServer
*
m_pNetAudioServer
;
ITASampleFrame
m_sfTempTransmitBuffer
;
ITASampleFrame
m_sfTempTransmitBuffer
;
ITADatasource
*
m_pInputStream
;
ITADatasource
*
m_pInputStream
;
int
m_iUpdateStrategy
;
friend
class
CITANetAudioStreamServer
;
friend
class
CITANetAudioStreamServer
;
};
};
...
...
include/ITANetAudioStream.h
View file @
4f46d4d7
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include
<string>
#include
<string>
#include
<vector>
#include
<vector>
class
ITA_DATA_SOURCES_API
CITANetAudioStreamConnection
;
class
CITANetAudioStreamConnection
;
//! Network audio stream
//! Network audio stream
/**
/**
...
@@ -35,7 +35,7 @@ class ITA_DATA_SOURCES_API CITANetAudioStreamConnection;
...
@@ -35,7 +35,7 @@ class ITA_DATA_SOURCES_API CITANetAudioStreamConnection;
*
*
* \note not thread-safe
* \note not thread-safe
*/
*/
class
CITANetAudioStream
:
public
ITADatasource
class
ITA_DATA_SOURCES_API
CITANetAudioStream
:
public
ITADatasource
{
{
public:
public:
CITANetAudioStream
(
int
iChannels
,
double
dSamplingRate
,
int
iBufferSize
,
int
iRingBufferCapacity
);
CITANetAudioStream
(
int
iChannels
,
double
dSamplingRate
,
int
iBufferSize
,
int
iRingBufferCapacity
);
...
...
include/ITAStreamFilter.h
deleted
100644 → 0
View file @
75f6836b
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITAStreamFunctionGenerator.h 2900 2012-09-17 08:42:42Z stienen $
#ifndef INCLUDE_WATCHER_ITA_STREAM_FILTER
#define INCLUDE_WATCHER_ITA_STREAM_FILTER
#include
<ITADataSourcesDefinitions.h>
#include
<ITADataSource.h>
#include
<ITATypes.h>
#include
<vector>
class
ITAStreamFilter
:
public
ITADatasource
{
public:
//! Konstruktor
ITAStreamFilter
(
ITADatasource
*
pdsInput
=
NULL
);
//! Destruktor
virtual
~
ITAStreamFilter
();
//! Eingangsdatenquelle zurckgeben
ITADatasource
*
GetInputDatasource
()
const
;
// TODO: Erstmal aus...
//! Eingangsdatenquelle setzen
//void SetInputDatasource(ITADatasource* pdsInput);
// -= Realisierung der abstrakten Methoden von "ITADatasource" =-
const
float
*
GetBlockPointer
(
unsigned
int
uiChannel
,
bool
bWaitForData
=
true
);
void
IncrementBlockPointer
();
protected:
//! Verarbeitungsmethode
/**
* In dieser Methode werden die neue Eingangsdaten aller Kanle verarbeitet und das Filter berechnet.
*/
virtual
void
ProcessAllChannels
(
const
float
**
ppfInputData
,
float
**
ppfOutputData
)
{
/*
Hinweis: Diese Vorgabe-Implementierung setzt den Methodenaufruf in die kanalweise
Verarbeitung mittels der Methode "ProcessChannel" um. Diese Verfahrensweise
ist adquat fr Filter welche eine kanal-unabhngige Verarbeitung erlauben.
Mchten Sie einen Filter mit kanal-abhngiger Verarbeitung bauen,
so muss diese Methode entsprechend angepasst werden.
Hierbei mssen Sie nicht zwangslufig die Methode "ProcessChannel" involvieren.
*/
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
ProcessChannel
(
i
,
ppfInputData
[
i
],
ppfOutputData
[
i
]);
}
//! Verarbeitungsmethode
/**
* In dieser Methode werden fr einen Kanal neue Eingangsdaten verarbeitet und das Filter berechnet.
* Diese Methode wird die kanal-unabhngige Datenverarbeitung des Filters realisiert. Kanal-unabhngig
* bedeutet, dass die Ausgangsdaten dieses Kanals einzig aus den Eingangsdaten des selben Kanals
* berechnet werden knnen.
*/
virtual
void
ProcessChannel
(
unsigned
int
uiChannel
,
const
float
*
pfInputData
,
float
*
pfOutputData
)
{
// Dies ist eine Vorgabe-Implementierung, welche die Eingangsdaten unverndert in die Ausgabe kopiert
//fm_copy(pfOutputData, pfInputData, m_uiBlocklength);
memcpy
(
pfOutputData
,
pfInputData
,
m_uiBlocklength
*
sizeof
(
float
));
}
private:
ITADatasource
*
m_pdsInput
;
// Eingangsdatenquelle
std
::
vector
<
const
float
*>
m_vpfInputData
;
// Eingangsdatenzeiger
std
::
vector
<
float
*>
m_vpfOutputBuffer
;
// Ausgabepuffer
bool
m_bGBPCalled
;
// Flag die Anzeigt ob seit dem letzten IncrementBlockPointer (IBP)
// bereits ein erneuter Eintritt in GetBlockPointer (GBP) erfolgt ist
};
#endif // INCLUDE_WATCHER_ITA_STREAM_FILTER
\ No newline at end of file
include/ITAStreamFunctionGenerator.h
View file @
4f46d4d7
...
@@ -37,16 +37,6 @@ public:
...
@@ -37,16 +37,6 @@ public:
WHITE_NOISE
//!< White noise
WHITE_NOISE
//!< White noise
};
};
//! Constructor
/**
* Creates a new function generator.
*
* \param uiChannels Number of output channels
* \param dSamplerate Sampling rate [Hz]
* \param uiBlocklength Blocklength [samples]
*/
ITAStreamFunctionGenerator
(
unsigned
int
uiChannels
,
double
dSamplerate
,
unsigned
int
uiBlocklength
);
//! Constructor
//! Constructor
/**
/**
* Creates a new function generator with specific parameters
* Creates a new function generator with specific parameters
...
@@ -62,7 +52,7 @@ public:
...
@@ -62,7 +52,7 @@ public:
ITAStreamFunctionGenerator
(
unsigned
int
uiChannels
,
double
dSamplerate
,
unsigned
int
uiBlocklength
,
int
iSignalFunction
,
double
dFrequency
,
float
fAmplitude
,
bool
bPeriodic
);
ITAStreamFunctionGenerator
(
unsigned
int
uiChannels
,
double
dSamplerate
,
unsigned
int
uiBlocklength
,
int
iSignalFunction
,
double
dFrequency
,
float
fAmplitude
,
bool
bPeriodic
);
//! Destructor
//! Destructor
virtual
~
ITAStreamFunctionGenerator
();
inline
virtual
~
ITAStreamFunctionGenerator
()
{}
;
//! Reset
//! Reset
/**
/**
...
...
src/ITANetAudioSampleServer.cpp
0 → 100644
View file @
4f46d4d7
#include
<ITANetAudioSampleServer.h>
// ITA includes
#include
<ITADataSource.h>
#include
<ITAException.h>
#include
<ITAStreamInfo.h>
// Vista includes
#include
<VistaInterProcComm/Concurrency/VistaThreadLoop.h>
#include
<VistaInterProcComm/Connections/VistaConnectionIP.h>
#include
<VistaInterProcComm/IPNet/VistaTCPServer.h>
#include
<VistaInterProcComm/IPNet/VistaTCPSocket.h>
#include
<VistaBase/VistaTimeUtils.h>
#include
<VistaInterProcComm/IPNet/VistaIPAddress.h>
// STL
#include
<cmath>
#include
<cassert>
class
CITANetAudioStreamServer
:
public
VistaThreadLoop
{
public:
enum
MessageType
{
NET_MESSAGE_NONE
=
0
,
NET_MESSAGE_OPEN
,
NET_MESSAGE_CLOSE
,
NET_MESSAGE_SAMPLES
,
};
inline
CITANetAudioStreamServer
(
CITANetAudioSampleServer
*
pParent
)
:
m_pParent
(
pParent
)
,
m_bStopIndicated
(
false
)
,
m_pServer
(
NULL
)
,
m_pSocket
(
NULL
)
,
m_iClientRingBufferSize
(
-
1
)
,
m_iClientBufferSize
(
-
1
)
,
m_iClientRingBufferFreeSamples
(
0
)
,
m_dClientSampleRate
(
-
1
)
{
};
inline
~
CITANetAudioStreamServer
()
{
};
inline
std
::
string
GetServerAddress
()
const
{
if
(
m_pServer
)
{
std
::
string
sAddress
;
m_pServer
->
GetServerAddress
().
GetIPAddress
().
GetAddressString
(
sAddress
);
return
sAddress
;
}
else
return
""
;
};
inline
int
GetNetworkPort
()
const
{
if
(
m_pServer
)
m_pServer
->
GetServerAddress
().
GetPortNumber
();
else
return
-
1
;
};
inline
bool
Start
(
const
std
::
string
&
sAddress
,
int
iPort
)
{
if
(
m_pServer
)
ITA_EXCEPT1
(
MODAL_EXCEPTION
,
"This net sample server is already started"
);
m_pServer
=
new
VistaTCPServer
(
sAddress
,
iPort
,
1
);
m_pSocket
=
m_pServer
->
GetNextClient
();
long
nIncomingBytes
=
m_pSocket
->
WaitForIncomingData
(
0
);
int
iBytesReceived
=
m_pSocket
->
ReceiveRaw
(
&
m_iClientChannels
,
sizeof
(
int
)
);
iBytesReceived
=
m_pSocket
->
ReceiveRaw
(
&
m_dClientSampleRate
,
sizeof
(
double
)
);
iBytesReceived
=
m_pSocket
->
ReceiveRaw
(
&
m_iClientBufferSize
,
sizeof
(
int
)
);
iBytesReceived
=
m_pSocket
->
ReceiveRaw
(
&
m_iClientRingBufferSize
,
sizeof
(
int
)
);
m_iClientRingBufferFreeSamples
=
m_iClientRingBufferFreeSamples
;
int
iMessageID
=
1
;
m_pSocket
->
SendRaw
(
&
iMessageID
,
sizeof
(
int
)
);
Run
();
};
inline
void
Disconnect
()
{
m_bStopIndicated
=
true
;
StopGently
(
true
);
m_pSocket
=
NULL
;
delete
m_pServer
;
m_pServer
=
NULL
;
m_bStopIndicated
=
false
;
};
inline
bool
IsConnected
()
const
{
if
(
!
m_pSocket
)
return
false
;
return
m_pSocket
->
GetIsConnected
();
};
inline
bool
LoopBody
()
{
if
(
m_bStopIndicated
)
return
true
;
if
(
m_pSocket
->
GetIsConnected
()
==
false
)
{
StopGently
(
true
);
return
false
;
}
ITAStreamInfo
oStreamInfo
;
ITADatasource
*
pIn
=
m_pParent
->
GetInputStream
();
for
(
int
iChannelIndex
=
0
;
iChannelIndex
<
int
(
m_pParent
->
GetInputStream
()
->
GetNumberOfChannels
()
);
iChannelIndex
++
)
{
const
float
*
pfData
=
pIn
->
GetBlockPointer
(
iChannelIndex
,
&
oStreamInfo
);
int
iNumSamples
=
pIn
->
GetBlocklength
();
m_pSocket
->
SendRaw
(
pfData
,
iNumSamples
*
sizeof
(
float
)
);
}
return
true
;
};
private:
VistaTCPServer
*
m_pServer
;
VistaTCPSocket
*
m_pSocket
;
CITANetAudioSampleServer
*
m_pParent
;
ITASampleFrame
m_sfReceivingBuffer
;
bool
m_bStopIndicated
;
int
m_iClientChannels
;
int
m_iClientRingBufferSize
;
int
m_iClientBufferSize
;
int
m_iClientRingBufferFreeSamples
;
double
m_dClientSampleRate
;
};
CITANetAudioSampleServer
::
CITANetAudioSampleServer
()
:
m_pInputStream
(
NULL
)
,
m_iUpdateStrategy
(
AUTO
)
{
m_pNetAudioServer
=
new
CITANetAudioStreamServer
(
this
);
}
bool
CITANetAudioSampleServer
::
Start
(
const
std
::
string
&
sAddress
,
int
iPort
)
{
return
m_pNetAudioServer
->
Start
(
sAddress
,
iPort
);
}
bool
CITANetAudioSampleServer
::
IsClientConnected
()
const
{
return
m_pNetAudioServer
->
IsConnected
();
}
std
::
string
CITANetAudioSampleServer
::
GetNetworkAddress
()
const
{
return
m_pNetAudioServer
->
GetServerAddress
();
}
int
CITANetAudioSampleServer
::
GetNetworkPort
()
const
{
return
m_pNetAudioServer
->
GetNetworkPort
();
}
void
CITANetAudioSampleServer
::
SetInputStream
(
ITADatasource
*
pInStream
)
{
m_pInputStream
=
pInStream
;
}
void
CITANetAudioSampleServer
::
SetAutomaticUpdateRate
()
{
m_iUpdateStrategy
=
AUTO
;
}
ITADatasource
*
CITANetAudioSampleServer
::
GetInputStream
()
const
{
return
m_pInputStream
;
}
src/ITAStreamFilter.cpp
deleted
100644 → 0
View file @
75f6836b
/*
+----------------------------------------------------------+
| |
| ITAStreamFilter.cpp |
| Eine abstrakte Basisklasse fr Filter welche |
| auf Audiostreams arbeiten |
| |
| Autoren: Frank Wefers |
| |
| (c) Copyright Institut fr technische Akustik (ITA) |
| Aachen university of technology (RWTH), 2008 |
| |
+----------------------------------------------------------+
*/
// $Id: ITAStreamFilter.cpp,v 1.2 2008-09-02 08:53:35 fwefers Exp $
#include
"ITAStreamFilter.h"
#include
<ITAException.h>
ITAStreamFilter
::
ITAStreamFilter
(
ITADatasource
*
pdsInput
)
:
ITADatasource
(
pdsInput
->
GetBlocklength
(),
pdsInput
->
GetNumberOfChannels
(),
pdsInput
->
GetSamplerate
()),
m_pdsInput
(
pdsInput
),
m_vpfInputData
(
pdsInput
->
GetNumberOfChannels
()),
m_vpfOutputBuffer
(
pdsInput
->
GetNumberOfChannels
(),
NULL
)
{
// Ausgabepuffer allozieren (SIMD-aligned!)
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
m_vpfOutputBuffer
[
i
]
=
fm_falloc
(
m_uiBlocklength
);
m_bGBPCalled
=
false
;
if
(
pdsInput
!=
NULL
)
SetInputDatasource
(
pdsInput
);
}
ITAStreamFilter
::~
ITAStreamFilter
()
{
delete
[]
m_ppfInputData
;
if
(
m_ppfOutputBuffer
)
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
delete
[]
m_ppfOutputBuffer
[
i
];
delete
[]
m_ppfOutputBuffer
;
}
ITADatasource
*
ITAStreamFilter
::
GetInputDatasource
()
const
{
return
m_pdsInput
;
}
void
ITAStreamFilter
::
SetInputDatasource
(
ITADatasource
*
pdsInput
)
{
/* Hinweis: Sicherstellen, das sobald erstmal eine Datenquelle zugeordnet wurde,
die Zuordnung zu einer Datenquelle nicht mehr aufgehoben werden kann (Nullzeiger).
Also: Es drfen andere Datenquellen gesetzt werden, diese mssen aber
die selben Eigenschaften ausweisen, wie die erstmalig zugeordnete Datenquelle. */
if
(
pdsInput
==
NULL
)
ITA_EXCEPT1
(
INVALID_PARAMETER
,
"Nullpointer not allowed as parameter"
);
// Wurde schon erstmalig eine Datenquelle zuordnet? Dann auf gleiche Eigenschaften prfen!
if
(
m_pdsInput
!=
NULL
)
{
if
((
pdsInput
->
GetBlocklength
()
!=
m_uiBlocklength
)
||
(
pdsInput
->
GetNumberOfChannels
()
!=
m_uiChannels
)
||
(
pdsInput
->
GetSamplerate
()
!=
m_dSamplerate
))
ITA_EXCEPT1
(
INVALID_PARAMETER
,
"The new datasources' properties do not match the previous datasources' properties"
);
// TODO: Bei alter Datenquelle aufrumen? z.B. IncrementBlockPointer aufrufen?
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
for
(
unsigned
int
j
=
0
;
j
<
m_uiBlocklength
;
j
++
)
m_ppfOutputBuffer
[
i
][
j
]
=
0
;
}
else
{
// Erstmalige Zuordnung. Sicherstellen das alle Datenquellen-Eigenschaften bereits festgelegt sind
if
((
pdsInput
->
GetBlocklength
()
==
0
)
||
(
pdsInput
->
GetNumberOfChannels
()
==
0
)
||
(
pdsInput
->
GetSamplerate
()
==
0
))
ITA_EXCEPT1
(
INVALID_PARAMETER
,
"The input datasources' properties are not (completely) defined yet"
);
m_pdsInput
=
pdsInput
;
m_uiChannels
=
m_pdsInput
->
GetNumberOfChannels
();
m_uiBlocklength
=
m_pdsInput
->
GetBlocklength
();
m_dSamplerate
=
m_pdsInput
->
GetSamplerate
();
m_ppfOutputBuffer
=
new
float
*
[
m_uiChannels
];
memset
(
m_ppfOutputBuffer
,
0
,
m_uiChannels
*
sizeof
(
float
*
));
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
m_ppfOutputBuffer
[
i
]
=
new
float
[
m_uiBlocklength
];
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
for
(
unsigned
int
j
=
0
;
j
<
m_uiBlocklength
;
j
++
)
m_ppfOutputBuffer
[
i
][
j
]
=
0
;
m_ppfInputData
=
new
const
float
*
[
m_uiChannels
];
}
m_bGBPCalled
=
false
;
}
const
float
*
ITAStreamFilter
::
GetBlockPointer
(
unsigned
int
uiChannel
,
bool
bWaitForData
)
{
if
((
m_pdsInput
!=
NULL
)
&&
!
m_bGBPCalled
)
{
// Daten holen
for
(
unsigned
int
i
=
0
;
i
<
m_uiChannels
;
i
++
)
m_ppfInputData
[
i
]
=
m_pdsInput
->
GetBlockPointer
(
i
,
bWaitForData
);
// Filter berechnen
ProcessAllChannels
(
m_ppfInputData
,
m_ppfOutputBuffer
);
m_bGBPCalled
=
true
;
}
return
m_ppfOutputBuffer
[
uiChannel
];
}
void
ITAStreamFilter
::
IncrementBlockPointer
()
{
if
(
m_pdsInput
)
m_pdsInput
->
IncrementBlockPointer
();
m_bGBPCalled
=
false
;
}
\ No newline at end of file
src/ITAStreamFunctionGenerator.cpp
View file @
4f46d4d7
...
@@ -38,8 +38,6 @@ ITAStreamFunctionGenerator::ITAStreamFunctionGenerator(unsigned int uiChannels,
...
@@ -38,8 +38,6 @@ ITAStreamFunctionGenerator::ITAStreamFunctionGenerator(unsigned int uiChannels,
Reset
();
Reset
();
}
}
ITAStreamFunctionGenerator
::~
ITAStreamFunctionGenerator
()
{}
void
ITAStreamFunctionGenerator
::
Reset
()
void
ITAStreamFunctionGenerator
::
Reset
()
{
{
m_iSampleCount
=
0
;
m_iSampleCount
=
0
;
...
...
tests/NetAudio/ITANetAudioSampleServerTest.cpp
View file @
4f46d4d7
...
@@ -13,9 +13,7 @@ static int g_iBlockLength = 265;
...
@@ -13,9 +13,7 @@ static int g_iBlockLength = 265;
int
main
(
int
,
char
**
)
int
main
(
int
,
char
**
)
{
{
ITAStreamFunctionGenerator
oGenerator
(
1
,
g_dSampleRate
,
g_iBlockLength
);
ITAStreamFunctionGenerator
oGenerator
(
1
,
g_dSampleRate
,
g_iBlockLength
,
ITAStreamFunctionGenerator
::
SINE
,
456.78
f
,
0.81
f
,
true
);
oGenerator
.
SetFunction
(
ITAStreamFunctionGenerator
::
SINE
);
oGenerator
.
SetFrequency
(
567.89
f
);
CITANetAudioSampleServer
oSampleServer
;
CITANetAudioSampleServer
oSampleServer
;
oSampleServer
.
SetInputStream
(
&
oGenerator
);
oSampleServer
.
SetInputStream
(
&
oGenerator
);
...
...
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