Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
68bb738a
Commit
68bb738a
authored
Jan 25, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/alsa: use snd_pcm_?w_params_alloca()
parent
6b968bee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
AlsaInputPlugin.cxx
src/input/plugins/AlsaInputPlugin.cxx
+2
-13
No files found.
src/input/plugins/AlsaInputPlugin.cxx
View file @
68bb738a
...
...
@@ -33,7 +33,6 @@
#include "util/RuntimeError.hxx"
#include "util/StringCompare.hxx"
#include "util/ReusableArray.hxx"
#include "util/ScopeExit.hxx"
#include "Log.hxx"
#include "event/MultiSocketMonitor.hxx"
...
...
@@ -287,13 +286,7 @@ ConfigureCapture(snd_pcm_t *capture_handle,
int
err
;
snd_pcm_hw_params_t
*
hw_params
;
if
((
err
=
snd_pcm_hw_params_malloc
(
&
hw_params
))
<
0
)
throw
FormatRuntimeError
(
"Cannot allocate hardware parameter structure (%s)"
,
snd_strerror
(
err
));
AtScopeExit
(
hw_params
)
{
snd_pcm_hw_params_free
(
hw_params
);
};
snd_pcm_hw_params_alloca
(
&
hw_params
);
if
((
err
=
snd_pcm_hw_params_any
(
capture_handle
,
hw_params
))
<
0
)
throw
FormatRuntimeError
(
"Cannot initialize hardware parameter structure (%s)"
,
...
...
@@ -373,14 +366,10 @@ ConfigureCapture(snd_pcm_t *capture_handle,
(
unsigned
)
alsa_buffer_size
,
(
unsigned
)
alsa_period_size
);
snd_pcm_sw_params_t
*
sw_params
;
snd_pcm_sw_params_alloca
(
&
sw_params
);
snd_pcm_sw_params_malloc
(
&
sw_params
);
snd_pcm_sw_params_current
(
capture_handle
,
sw_params
);
AtScopeExit
(
sw_params
)
{
snd_pcm_sw_params_free
(
sw_params
);
};
if
((
err
=
snd_pcm_sw_params
(
capture_handle
,
sw_params
))
<
0
)
throw
FormatRuntimeError
(
"unable to install sw params (%s)"
,
snd_strerror
(
err
));
...
...
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