CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
System
Application
Windows
Win32ConsoleApp.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2004 MUSIC TECHNOLOGY GROUP (MTG)
3
* UNIVERSITAT POMPEU FABRA
4
*
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
22
#ifndef __WIN32CONSOLEAPP__
23
#define __WIN32CONSOLEAPP__
24
25
#ifndef WIN32
26
#error "Hey you, Linux User! You shouldn't be including this thing"
27
#endif
28
29
#include "
BaseAudioApplication.hxx
"
30
#include "CLAM_windows.h"
31
#undef GetClassName
32
#undef CreateWindow
33
34
namespace
CLAM
35
{
36
37
#ifdef WIN32
38
39
// :MRJ:TODO: I don't know why DirectXAudioDevice class hasn't the static pointer already defined
40
// instead of relying that responsability to such a concrete class as DXFullDuplex. While I haven't
41
// got some time to rework the thing we will need the following ugly kludge...
42
43
class
DXFullDuplex;
44
45
template
<
typename
DXDeviceType>
46
void
DXHook
( DXDeviceType* homemade_tmpl_func_overload,
void
* wndhndler )
47
{
48
DXDeviceType::shMainWnd = (HWND)wndhndler;
49
}
50
51
#define DXFullDuplexHook( handler ) DXHook( (DXFullDuplex*)NULL, handler )
52
53
#endif
54
55
56
class
Win32ConsoleApp
57
:
public
BaseAudioApplication
58
{
59
public
:
60
61
Win32ConsoleApp
()
62
{
63
}
64
65
virtual
~Win32ConsoleApp
()
66
{
67
}
68
69
70
void
Run
(
int
argc = 0,
char
** argv = 0 );
71
virtual
void
UserMain
(
void
);
72
virtual
void
AudioMain
(
void
) = 0;
73
static
HWND
GetHandle
(
void
);
74
75
private
:
76
77
virtual
void
AppCleanup(
void
)
78
{
79
}
80
81
};
82
83
84
85
86
}
87
88
#endif // Win32ConsoleApp.hxx
89
Generated by
1.8.1