Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITADataSources
Commits
0e455385
Commit
0e455385
authored
Feb 06, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Implementing ita_whad features for portaudii
parent
9c1745ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/ita_whad/CMakeLists.txt
View file @
0e455385
...
...
@@ -6,13 +6,13 @@ include( VistaCommon )
vista_use_package
(
ITADataSources REQUIRED FIND_DEPENDENCIES
)
if
(
TA_DATA_SOURCES_WITH_INTEGRATED_ASIO
)
if
(
I
TA_DATA_SOURCES_WITH_INTEGRATED_ASIO
)
add_definitions
(
"-DITA_WHAD_WITH_ASIO"
)
endif
(
TA_DATA_SOURCES_WITH_INTEGRATED_ASIO
)
endif
(
)
if
(
TA_DATA_SOURCES_WITH_INTEGRATED_PORTAUDIO
)
if
(
I
TA_DATA_SOURCES_WITH_INTEGRATED_PORTAUDIO
)
add_definitions
(
"-DITA_WHAD_WITH_PORTAUDIO"
)
endif
(
TA_DATA_SOURCES_WITH_INTEGRATED_PORTAUDIO
)
endif
(
)
add_executable
(
ita_whad main.cpp
)
target_link_libraries
(
ita_whad
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
...
...
apps/ita_whad/main.cpp
View file @
0e455385
...
...
@@ -31,26 +31,49 @@ int main( int, char** )
#ifdef ITA_WHAD_WITH_ASIO
string
sFileName
=
"ita_whad_asio.txt"
;
FILE
*
f
ile
=
fopen
(
sFileName
.
c_str
(),
"w"
);
string
s
ASIO
FileName
=
"ita_whad_asio.txt"
;
FILE
*
PASIOF
ile
=
fopen
(
s
ASIO
FileName
.
c_str
(),
"w"
);
ITAsioInitializeLibrary
();
long
lDrivers
=
ITAsioGetNumDrivers
();
if
(
lDrivers
==
0
)
long
l
ASIO
Drivers
=
ITAsioGetNumDrivers
();
if
(
l
ASIO
Drivers
==
0
)
cerr
<<
"Warning: no ASIO drivers found."
<<
endl
;
for
(
long
i
=
0
;
i
<
lDrivers
;
i
++
)
cout
<<
" ### ASIO ### "
<<
endl
;
for
(
long
i
=
0
;
i
<
lASIODrivers
;
i
++
)
{
cout
<<
"["
<<
i
+
1
<<
"]
\"
"
<<
ITAsioGetDriverName
(
i
)
<<
"
\"
"
<<
endl
;
cout
<<
"["
<<
i
+
1
<<
"]
\"
"
<<
ITAsioGetDriverName
(
i
)
<<
"
\"
"
<<
endl
;
}
cout
<<
endl
;
ITAsioFinalizeLibrary
();
fclose
(
f
ile
);
fclose
(
PASIOF
ile
);
#endif // ITA_WHAD_WITH_ASIO
#ifdef ITA_WHAD_WITH_PORTAUDIO
string
sPAFileName
=
"ita_whad_portaudio.txt"
;
FILE
*
pPAFile
=
fopen
(
sPAFileName
.
c_str
(),
"w"
);
ITAPortaudioInterface
oITAPA
(
44.1e3
,
1024
);
oITAPA
.
Initialize
();
int
iPANumDevices
=
oITAPA
.
GetNumDevices
();
cout
<<
" ### Portaudio ### "
<<
endl
;
for
(
int
i
=
0
;
i
<
iPANumDevices
;
i
++
)
{
cout
<<
"["
<<
i
+
1
<<
"]
\"
"
<<
oITAPA
.
GetDeviceName
(
i
)
<<
"
\"
"
<<
endl
;
}
cout
<<
endl
;
oITAPA
.
Finalize
();
fclose
(
pPAFile
);
#endif // ITA_WHAD_WITH:PORTAUDIO
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment