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
b13cd03f
Commit
b13cd03f
authored
Mar 07, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output_all: audio_output_all_update() returns bool
audio_output_all_update() returns true when there is at least open output device which is open.
parent
498ec26f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
output_all.c
src/output_all.c
+12
-3
output_control.c
src/output_control.c
+4
-2
output_control.h
src/output_control.h
+3
-1
No files found.
src/output_all.c
View file @
b13cd03f
...
...
@@ -163,16 +163,25 @@ audio_output_all_reset_reopen(void)
}
}
static
void
/**
* Opens all output devices which are enabled, but closed.
*
* @return true if there is at least open output device which is open
*/
static
bool
audio_output_all_update
(
void
)
{
unsigned
int
i
;
bool
ret
=
false
;
if
(
!
audio_format_defined
(
&
input_audio_format
))
return
;
return
false
;
for
(
i
=
0
;
i
<
num_audio_outputs
;
++
i
)
audio_output_update
(
&
audio_outputs
[
i
],
&
input_audio_format
);
ret
=
ret
||
audio_output_update
(
&
audio_outputs
[
i
],
&
input_audio_format
);
return
ret
;
}
bool
...
...
src/output_control.c
View file @
b13cd03f
...
...
@@ -94,16 +94,18 @@ audio_output_open(struct audio_output *ao,
return
ao
->
open
;
}
void
bool
audio_output_update
(
struct
audio_output
*
ao
,
const
struct
audio_format
*
audio_format
)
{
if
(
ao
->
enabled
)
{
if
(
ao
->
fail_timer
==
NULL
||
g_timer_elapsed
(
ao
->
fail_timer
,
NULL
)
>
REOPEN_AFTER
)
audio_output_open
(
ao
,
audio_format
);
return
audio_output_open
(
ao
,
audio_format
);
}
else
if
(
audio_output_is_open
(
ao
))
audio_output_close
(
ao
);
return
false
;
}
void
...
...
src/output_control.h
View file @
b13cd03f
...
...
@@ -45,8 +45,10 @@ audio_output_open(struct audio_output *ao,
/**
* Opens or closes the device, depending on the "enabled" flag.
*
* @return true if the device is open
*/
void
bool
audio_output_update
(
struct
audio_output
*
ao
,
const
struct
audio_format
*
audio_format
);
...
...
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