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
56cf54e8
Commit
56cf54e8
authored
Sep 11, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output: removed audio_output.convertAudioFormat
Instead of checking convertAudioFormat, we can simply check if reqAudioFormat is defined. This saves 4 bytes in the struct.
parent
a751011e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
output_api.h
src/output_api.h
+0
-1
output_control.c
src/output_control.c
+1
-1
output_init.c
src/output_init.c
+2
-5
No files found.
src/output_api.h
View file @
56cf54e8
...
@@ -60,7 +60,6 @@ struct audio_output {
...
@@ -60,7 +60,6 @@ struct audio_output {
const
struct
audio_output_plugin
*
plugin
;
const
struct
audio_output_plugin
*
plugin
;
int
convertAudioFormat
;
struct
audio_format
inAudioFormat
;
struct
audio_format
inAudioFormat
;
struct
audio_format
outAudioFormat
;
struct
audio_format
outAudioFormat
;
struct
audio_format
reqAudioFormat
;
struct
audio_format
reqAudioFormat
;
...
...
src/output_control.c
View file @
56cf54e8
...
@@ -33,7 +33,7 @@ int audio_output_open(struct audio_output *audioOutput,
...
@@ -33,7 +33,7 @@ int audio_output_open(struct audio_output *audioOutput,
audioOutput
->
inAudioFormat
=
*
audioFormat
;
audioOutput
->
inAudioFormat
=
*
audioFormat
;
if
(
audio
Output
->
convertAudioFormat
)
{
if
(
audio
_format_defined
(
&
audioOutput
->
reqAudioFormat
)
)
{
audioOutput
->
outAudioFormat
=
audioOutput
->
reqAudioFormat
;
audioOutput
->
outAudioFormat
=
audioOutput
->
reqAudioFormat
;
}
else
{
}
else
{
audioOutput
->
outAudioFormat
=
audioOutput
->
inAudioFormat
;
audioOutput
->
outAudioFormat
=
audioOutput
->
inAudioFormat
;
...
...
src/output_init.c
View file @
56cf54e8
...
@@ -86,25 +86,22 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
...
@@ -86,25 +86,22 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
ao
->
plugin
=
plugin
;
ao
->
plugin
=
plugin
;
ao
->
open
=
0
;
ao
->
open
=
0
;
ao
->
convertAudioFormat
=
0
;
ao
->
sameInAndOutFormats
=
0
;
ao
->
sameInAndOutFormats
=
0
;
ao
->
convBuffer
=
NULL
;
ao
->
convBuffer
=
NULL
;
ao
->
convBufferLen
=
0
;
ao
->
convBufferLen
=
0
;
memset
(
&
ao
->
inAudioFormat
,
0
,
sizeof
(
ao
->
inAudioFormat
));
memset
(
&
ao
->
inAudioFormat
,
0
,
sizeof
(
ao
->
inAudioFormat
));
memset
(
&
ao
->
outAudioFormat
,
0
,
sizeof
(
ao
->
outAudioFormat
));
memset
(
&
ao
->
outAudioFormat
,
0
,
sizeof
(
ao
->
outAudioFormat
));
memset
(
&
ao
->
reqAudioFormat
,
0
,
sizeof
(
ao
->
reqAudioFormat
));
memset
(
&
ao
->
convState
,
0
,
sizeof
(
ConvState
));
memset
(
&
ao
->
convState
,
0
,
sizeof
(
ConvState
));
if
(
format
)
{
if
(
format
)
{
ao
->
convertAudioFormat
=
1
;
if
(
0
!=
parseAudioConfig
(
&
ao
->
reqAudioFormat
,
format
))
{
if
(
0
!=
parseAudioConfig
(
&
ao
->
reqAudioFormat
,
format
))
{
FATAL
(
"error parsing format at line %i
\n
"
,
bp
->
line
);
FATAL
(
"error parsing format at line %i
\n
"
,
bp
->
line
);
}
}
ao
->
outAudioFormat
=
ao
->
reqAudioFormat
;
ao
->
outAudioFormat
=
ao
->
reqAudioFormat
;
}
}
else
audio_format_clear
(
&
ao
->
reqAudioFormat
);
if
(
plugin
->
init
(
ao
,
param
)
!=
0
)
if
(
plugin
->
init
(
ao
,
param
)
!=
0
)
return
0
;
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