Skip to content
Snippets Groups Projects
Select Git revision
  • f794c92d5278aa874429bed3a5571ccaf3b27b8d
  • master default protected
  • develop protected
  • feature/asio-profile
  • ti_lab_build
  • mbe
  • asio_stream_debugging_tools
  • ba_2016_heimes
  • jst
  • fabian
  • ITADataSources_v2024a
  • VA_v2023b
  • VA_v2023a
  • VA_v2022a
  • before_cmake_rework
  • v2021.a
  • v2020.a
  • v2019.a
  • v2018.b
  • v2018.a
  • v2017.d
  • v2017.c
  • v2017.b
  • good_after_refactoring
  • first_good_running_netaudio
  • v2017.a
  • v2016.a
27 results

ITANetAudioStreamingServerTest.cpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ITANetAudioStreamingServerTest.cpp 883 B
    #include <iostream>
    #include <string>
    
    #include <ITANetAudioStreamingServer.h>
    #include <ITANetAudioServer.h>
    #include <ITAStreamFunctionGenerator.h>
    #include <ITAFileDatasource.h>
    
    using namespace std;
    
    static string g_sServerName = "localhost";
    static int g_iServerPort = 12480;
    static double g_dSampleRate = 44100;
    static int g_iBlockLength = 256;
    
    int main( int , char** )
    {
    	ITAStreamFunctionGenerator oGenerator( 2, g_dSampleRate, g_iBlockLength, ITAStreamFunctionGenerator::SINE, 456.78f, 0.81f, true );
    	ITAFileDatasource oDatei("Gershwin.wav", g_iBlockLength);
    	CITANetAudioStreamingServer oStreamingServer;
    	oStreamingServer.SetInputStream(&oDatei);
    
    	cout << "Starting server and waiting for connections on '" << g_sServerName << "' on port " << g_iServerPort << endl;
    	oStreamingServer.Start( g_sServerName, g_iServerPort );
    
    	int iKey;
    	std::cin >> iKey;
    	
    	return 0;
    }