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
f2082174
Commit
f2082174
authored
Dec 24, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/run_output: enable and disable the output
parent
43c50586
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
run_output.c
test/run_output.c
+10
-0
No files found.
test/run_output.c
View file @
f2082174
...
...
@@ -124,7 +124,15 @@ run_output(struct audio_output *ao, struct audio_format *audio_format)
/* open the audio output */
GError
*
error
=
NULL
;
if
(
!
ao_plugin_enable
(
ao
,
&
error
))
{
g_printerr
(
"Failed to enable audio output: %s
\n
"
,
error
->
message
);
g_error_free
(
error
);
return
false
;
}
if
(
!
ao_plugin_open
(
ao
,
audio_format
,
&
error
))
{
ao_plugin_disable
(
ao
);
g_printerr
(
"Failed to open audio output: %s
\n
"
,
error
->
message
);
g_error_free
(
error
);
...
...
@@ -158,6 +166,7 @@ run_output(struct audio_output *ao, struct audio_format *audio_format)
&
error
);
if
(
consumed
==
0
)
{
ao_plugin_close
(
ao
);
ao_plugin_disable
(
ao
);
g_printerr
(
"Failed to play: %s
\n
"
,
error
->
message
);
g_error_free
(
error
);
...
...
@@ -173,6 +182,7 @@ run_output(struct audio_output *ao, struct audio_format *audio_format)
}
ao_plugin_close
(
ao
);
ao_plugin_disable
(
ao
);
return
true
;
}
...
...
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