ITANetAudioStreamingServerTest.cpp 796 Bytes
Newer Older
1
2
3
#include <iostream>
#include <string>

4
5
#include <ITANetAudioStreamingServer.h>
#include <ITANetAudioServer.h>
6
7
8
9
10
11
12
#include <ITAStreamFunctionGenerator.h>

using namespace std;

static string g_sServerName = "localhost";
static int g_iServerPort = 12480;
static double g_dSampleRate = 44.1e3;
13
static int g_iBlockLength = 265;
14
15
16

int main( int , char** )
{
17
	ITAStreamFunctionGenerator oGenerator( 1, g_dSampleRate, g_iBlockLength, ITAStreamFunctionGenerator::SINE, 456.78f, 0.81f, true );
18

Anne's avatar
Anne committed
19
20
	CITANetAudioStreamingServer oStreamingServer;
	oStreamingServer.SetInputStream( &oGenerator );
21

22
	cout << "Starting server and waiting for connections on '" << g_sServerName << "' on port " << g_iServerPort << endl;
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
23
	oStreamingServer.Start( g_sServerName, g_iServerPort );
Dipl.-Ing. Jonas Stienen's avatar
Stuff    
Dipl.-Ing. Jonas Stienen committed
24
25
26

	int iKey;
	cin >> iKey;
27
28
29
	
	return 0;
}