GenericPathRendererTest.cpp 1.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <VACore.h>
#include <VACoreFactory.h>
#include <VAException.h>

#include <iostream>

using namespace std;

IVACore* core = NULL;

void TestModuleInterface()
{
	std::vector< CVAModuleInfo > viModuleInfos;
	core->EnumerateModules( viModuleInfos );

	if( viModuleInfos.size() )
		cout << "Found " << viModuleInfos.size() << " modules" << endl;

	for( size_t i = 0; i < viModuleInfos.size(); i++ )
	{
		cout << " + Module #" << i+1 << ": " << viModuleInfos[ i ].sName << " ( " << viModuleInfos[ i ].sDesc << " )" << endl;
	}
}

int main()
{
	try
	{
		core = VACore::CreateCoreInstance();
		core->Initialize();

		TestModuleInterface();
		
		int iListenerID = core->CreateListener( "MyGPListener" );
		core->SetListenerPosition( iListenerID, 0, 0, 0 );
		int iSourceID = core->CreateSoundSource( "MyGPSoundSource" );
		core->SetSoundSourcePosition( iSourceID, 0, 0, -2 );

		cout << "q+Enter to close." << endl;
		char cIn;
		cin >> cIn;

		core->Finalize();

	}
	catch( CVAException& e )
	{
		cerr << "Error: " << e << endl;
		int iErrorCode = e.GetErrorCode();
		delete core;

		return iErrorCode;
	}

	delete core;	

	return 0;
}