Toggle navigation
Toggle navigation
This project
Loading...
Sign in
노현욱
/
AR_instrument
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
노현욱
2023-04-24 15:03:09 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
715eaa29c362f579c942c6ea45dd0cf50c1c7e39
715eaa29
1 parent
ea0eb119
Device 정보 ㅊ출
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
get_device_check.py
get_device_check.py
0 → 100644
View file @
715eaa2
import
pyaudio
p
=
pyaudio
.
PyAudio
()
# Print number of available devices
num_devices
=
p
.
get_device_count
()
print
(
"Number of devices:"
,
num_devices
)
# Print details for each device
for
i
in
range
(
num_devices
):
device_info
=
p
.
get_device_info_by_index
(
i
)
print
(
"Device"
,
i
,
" - "
,
device_info
[
"name"
])
print
(
" Channels: "
,
device_info
[
"maxInputChannels"
],
"input / "
,
device_info
[
"maxOutputChannels"
],
"output"
)
print
(
" Default Sample Rate: "
,
device_info
[
"defaultSampleRate"
])
Please
register
or
login
to post a comment