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
3aa4564b
Commit
3aa4564b
authored
Sep 11, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output: removed audio_output.sameInAndOutFormats
Eliminate sameInAndOutFormats and check with audio_format_equals() each time it this information is needed. Another 4 bytes saved.
parent
56cf54e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
+2
-8
output_api.h
src/output_api.h
+0
-1
output_control.c
src/output_control.c
+2
-6
output_init.c
src/output_init.c
+0
-1
No files found.
src/output_api.h
View file @
3aa4564b
...
...
@@ -66,7 +66,6 @@ struct audio_output {
ConvState
convState
;
char
*
convBuffer
;
size_t
convBufferLen
;
int
sameInAndOutFormats
;
void
*
data
;
};
...
...
src/output_control.c
View file @
3aa4564b
...
...
@@ -44,10 +44,6 @@ int audio_output_open(struct audio_output *audioOutput,
if
(
!
audioOutput
->
open
)
ret
=
audioOutput
->
plugin
->
open
(
audioOutput
);
audioOutput
->
sameInAndOutFormats
=
audio_format_equals
(
&
audioOutput
->
inAudioFormat
,
&
audioOutput
->
outAudioFormat
);
return
ret
;
}
...
...
@@ -82,9 +78,9 @@ int audio_output_play(struct audio_output *audioOutput,
if
(
!
audioOutput
->
open
)
return
-
1
;
if
(
!
audioOutput
->
sameInAndOutFormats
)
{
if
(
!
audio_format_equals
(
&
audioOutput
->
inAudioFormat
,
&
audioOutput
->
outAudioFormat
))
convertAudioFormat
(
audioOutput
,
&
playChunk
,
&
size
);
}
ret
=
audioOutput
->
plugin
->
play
(
audioOutput
,
playChunk
,
size
);
...
...
src/output_init.c
View file @
3aa4564b
...
...
@@ -86,7 +86,6 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
ao
->
plugin
=
plugin
;
ao
->
open
=
0
;
ao
->
sameInAndOutFormats
=
0
;
ao
->
convBuffer
=
NULL
;
ao
->
convBufferLen
=
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