Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
ITADataSources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
ITADataSources
Commits
0e455385
Commit
0e455385
authored
Feb 06, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing ita_whad features for portaudii
parent
9c1745ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
12 deletions
+35
-12
apps/ita_whad/CMakeLists.txt
apps/ita_whad/CMakeLists.txt
+4
-4
apps/ita_whad/main.cpp
apps/ita_whad/main.cpp
+31
-8
No files found.
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
*
file
=
fopen
(
s
FileName
.
c_str
(),
"w"
);
string
s
ASIO
FileName
=
"ita_whad_asio.txt"
;
FILE
*
PASIOFile
=
fopen
(
sASIO
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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