Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
c62e5905
Commit
c62e5905
authored
Nov 02, 2005
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert 13023 here too
parent
f5bb6e70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+20
-20
No files found.
modules/audio_output/alsa.c
View file @
c62e5905
...
...
@@ -355,11 +355,11 @@ static int Open( vlc_object_t *p_this )
/* Choose the linear PCM format (read the comment above about FPU
and float32) */
if
(
p_aout
->
p_libvlc
->
i_cpu
&
CPU_CAPABILITY_FPU
)
/*
{
{
i_vlc_pcm_format
=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
);
i_snd_pcm_format
=
SND_PCM_FORMAT_FLOAT
;
}
else
*/
else
{
i_vlc_pcm_format
=
AOUT_FMT_S16_NE
;
i_snd_pcm_format
=
SND_PCM_FORMAT_S16
;
...
...
@@ -501,24 +501,6 @@ static int Open( vlc_object_t *p_this )
goto
error
;
}
/* Set rate. */
i_old_rate
=
p_aout
->
output
.
output
.
i_rate
;
#ifdef HAVE_ALSA_NEW_API
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
&
(
p_aout
->
output
.
output
.
i_rate
),
NULL
);
#else
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
p_aout
->
output
.
output
.
i_rate
,
NULL
);
#endif
if
(
i_snd_rc
<
0
||
p_aout
->
output
.
output
.
i_rate
!=
i_old_rate
)
{
msg_Warn
(
p_aout
,
"The rate %d Hz is not supported by your hardware. "
"Using %d Hz instead.
\n
"
,
i_old_rate
,
p_aout
->
output
.
output
.
i_rate
);
}
/* Set format. */
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_format
(
p_sys
->
p_snd_pcm
,
p_hw
,
i_snd_pcm_format
)
)
<
0
)
...
...
@@ -565,6 +547,24 @@ static int Open( vlc_object_t *p_this )
goto
error
;
}
/* Set rate. */
i_old_rate
=
p_aout
->
output
.
output
.
i_rate
;
#ifdef HAVE_ALSA_NEW_API
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
&
p_aout
->
output
.
output
.
i_rate
,
NULL
);
#else
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
p_aout
->
output
.
output
.
i_rate
,
NULL
);
#endif
if
(
i_snd_rc
<
0
||
p_aout
->
output
.
output
.
i_rate
!=
i_old_rate
)
{
msg_Warn
(
p_aout
,
"The rate %d Hz is not supported by your hardware. "
"Using %d Hz instead.
\n
"
,
i_old_rate
,
p_aout
->
output
.
output
.
i_rate
);
}
/* Set buffer size. */
#ifdef HAVE_ALSA_NEW_API
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_buffer_size_near
(
p_sys
->
p_snd_pcm
,
...
...
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