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
0140804e
Commit
0140804e
authored
May 02, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output_thread: moved code to ao_filter_open(), ao_filter_close()
parent
ecb5f68b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
output_thread.c
src/output_thread.c
+19
-7
No files found.
src/output_thread.c
View file @
0140804e
...
...
@@ -88,6 +88,20 @@ ao_disable(struct audio_output *ao)
}
}
static
const
struct
audio_format
*
ao_filter_open
(
struct
audio_output
*
ao
,
struct
audio_format
*
audio_format
,
GError
**
error_r
)
{
return
filter_open
(
ao
->
filter
,
audio_format
,
error_r
);
}
static
void
ao_filter_close
(
struct
audio_output
*
ao
)
{
filter_close
(
ao
->
filter
);
}
static
void
ao_open
(
struct
audio_output
*
ao
)
{
...
...
@@ -109,8 +123,7 @@ ao_open(struct audio_output *ao)
/* open the filter */
filter_audio_format
=
filter_open
(
ao
->
filter
,
&
ao
->
in_audio_format
,
&
error
);
filter_audio_format
=
ao_filter_open
(
ao
,
&
ao
->
in_audio_format
,
&
error
);
if
(
filter_audio_format
==
NULL
)
{
g_warning
(
"Failed to open filter for
\"
%s
\"
[%s]: %s"
,
ao
->
name
,
ao
->
plugin
->
name
,
error
->
message
);
...
...
@@ -137,7 +150,7 @@ ao_open(struct audio_output *ao)
ao
->
name
,
ao
->
plugin
->
name
,
error
->
message
);
g_error_free
(
error
);
filter_close
(
ao
->
filter
);
ao_filter_close
(
ao
);
ao
->
fail_timer
=
g_timer_new
();
return
;
}
...
...
@@ -176,7 +189,7 @@ ao_close(struct audio_output *ao, bool drain)
ao_plugin_cancel
(
ao
->
plugin
,
ao
->
data
);
ao_plugin_close
(
ao
->
plugin
,
ao
->
data
);
filter_close
(
ao
->
filter
);
ao_filter_close
(
ao
);
g_mutex_lock
(
ao
->
mutex
);
...
...
@@ -189,9 +202,8 @@ ao_reopen_filter(struct audio_output *ao)
const
struct
audio_format
*
filter_audio_format
;
GError
*
error
=
NULL
;
filter_close
(
ao
->
filter
);
filter_audio_format
=
filter_open
(
ao
->
filter
,
&
ao
->
in_audio_format
,
&
error
);
ao_filter_close
(
ao
);
filter_audio_format
=
ao_filter_open
(
ao
,
&
ao
->
in_audio_format
,
&
error
);
if
(
filter_audio_format
==
NULL
)
{
g_warning
(
"Failed to open filter for
\"
%s
\"
[%s]: %s"
,
ao
->
name
,
ao
->
plugin
->
name
,
error
->
message
);
...
...
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