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

4
5
#include <ITANetAudioStreamingServer.h>
#include <ITANetAudioServer.h>
6
#include <ITAStreamFunctionGenerator.h>
Anne's avatar
Anne committed
7
#include <ITAFileDatasource.h>
8
9
10
11
12

using namespace std;

static string g_sServerName = "localhost";
static int g_iServerPort = 12480;
Anne's avatar
Anne committed
13
static double g_dSampleRate = 44100;
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
14
static int g_iBlockLength = 256;
15
16
17

int main( int , char** )
{
Anne's avatar
Anne committed
18
	ITAStreamFunctionGenerator oGenerator( 2, g_dSampleRate, g_iBlockLength, ITAStreamFunctionGenerator::SINE, 456.78f, 0.81f, true );
19
	ITAFileDatasource oDatei("01_Empfang_Guten_Tag.wav", g_iBlockLength);
20
	CITANetAudioStreamingServer oStreamingServer;
Anne's avatar
Anne committed
21
	oStreamingServer.SetInputStream(&oDatei);
22

23
	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
24
	oStreamingServer.Start( g_sServerName, g_iServerPort );
Dipl.-Ing. Jonas Stienen's avatar
Stuff    
Dipl.-Ing. Jonas Stienen committed
25
26

	int iKey;
27
	std::cin >> iKey;
28
29
30
	
	return 0;
}