Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
33b89791
Commit
33b89791
authored
May 31, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: small cleanup
parent
37e6859a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
31 deletions
+28
-31
src/audio_output/output.c
src/audio_output/output.c
+26
-29
src/libvlc-module.c
src/libvlc-module.c
+2
-2
No files found.
src/audio_output/output.c
View file @
33b89791
...
...
@@ -43,14 +43,11 @@
int
aout_OutputNew
(
aout_instance_t
*
p_aout
,
audio_sample_format_t
*
p_format
)
{
p_aout
->
output
.
output
=
*
p_format
;
/* Retrieve user defaults. */
int
i_rate
=
var_InheritInteger
(
p_aout
,
"aout-rate"
);
vlc_value_t
val
,
text
;
/* kludge to avoid a fpu error when rate is 0... */
if
(
i_rate
==
0
)
i_rate
=
-
1
;
memcpy
(
&
p_aout
->
output
.
output
,
p_format
,
sizeof
(
audio_sample_format_t
)
);
if
(
i_rate
!=
-
1
)
if
(
i_rate
!=
0
)
p_aout
->
output
.
output
.
i_rate
=
i_rate
;
aout_FormatPrepare
(
&
p_aout
->
output
.
output
);
...
...
@@ -66,36 +63,34 @@ int aout_OutputNew( aout_instance_t * p_aout,
(
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
)
)
{
/* The user may have selected a different channels configuration. */
var_Get
(
p_aout
,
"audio-channels"
,
&
val
);
if
(
val
.
i_int
==
AOUT_VAR_CHAN_RSTEREO
)
switch
(
var_InheritInteger
(
p_aout
,
"audio-channels"
)
)
{
case
AOUT_VAR_CHAN_RSTEREO
:
p_aout
->
output
.
output
.
i_original_channels
|=
AOUT_CHAN_REVERSESTEREO
;
}
else
if
(
val
.
i_int
==
AOUT_VAR_CHAN_STEREO
)
{
break
;
case
AOUT_VAR_CHAN_STEREO
:
p_aout
->
output
.
output
.
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
}
else
if
(
val
.
i_int
==
AOUT_VAR_CHAN_LEFT
)
{
break
;
case
AOUT_VAR_CHAN_LEFT
:
p_aout
->
output
.
output
.
i_original_channels
=
AOUT_CHAN_LEFT
;
}
else
if
(
val
.
i_int
==
AOUT_VAR_CHAN_RIGHT
)
{
break
;
case
AOUT_VAR_CHAN_RIGHT
:
p_aout
->
output
.
output
.
i_original_channels
=
AOUT_CHAN_RIGHT
;
}
else
if
(
val
.
i_int
==
AOUT_VAR_CHAN_DOLBYS
)
{
p_aout
->
output
.
output
.
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_DOLBYSTEREO
;
break
;
case
AOUT_VAR_CHAN_DOLBYS
:
p_aout
->
output
.
output
.
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_DOLBYSTEREO
;
break
;
}
}
else
if
(
p_aout
->
output
.
output
.
i_physical_channels
==
AOUT_CHAN_CENTER
&&
(
p_aout
->
output
.
output
.
i_original_channels
&
AOUT_CHAN_PHYSMASK
)
==
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
)
{
vlc_value_t
val
,
text
;
/* Mono - create the audio-channels variable. */
var_Create
(
p_aout
,
"audio-channels"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
);
...
...
@@ -122,6 +117,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
&&
(
p_aout
->
output
.
output
.
i_original_channels
&
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
))
)
{
vlc_value_t
val
,
text
;
/* Stereo - create the audio-channels variable. */
var_Create
(
p_aout
,
"audio-channels"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
);
...
...
src/libvlc-module.c
View file @
33b89791
...
...
@@ -277,7 +277,7 @@ static const char *const ppsz_snap_formats[] =
#define AOUT_RATE_TEXT N_("Audio output frequency (Hz)")
#define AOUT_RATE_LONGTEXT N_( \
"You can force the audio output frequency here. Common values are " \
"
-1 (default
), 48000, 44100, 32000, 22050, 16000, 11025, 8000.")
"
0 (undefined
), 48000, 44100, 32000, 22050, 16000, 11025, 8000.")
#if !defined( __APPLE__ )
#define AOUT_RESAMP_TEXT N_("High quality audio resampling")
...
...
@@ -1600,7 +1600,7 @@ vlc_module_begin ()
add_integer_with_range
(
"volume-step"
,
AOUT_VOLUME_STEP
,
AOUT_VOLUME_MIN
,
AOUT_VOLUME_MAX
,
VOLUME_STEP_TEXT
,
VOLUME_STEP_LONGTEXT
,
true
)
add_integer
(
"aout-rate"
,
-
1
,
AOUT_RATE_TEXT
,
add_integer
(
"aout-rate"
,
0
,
AOUT_RATE_TEXT
,
AOUT_RATE_LONGTEXT
,
true
)
#if HAVE_FPU && !defined( __APPLE__ )
add_bool
(
"hq-resampling"
,
1
,
AOUT_RESAMP_TEXT
,
...
...
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