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
f5c43889
Commit
f5c43889
authored
Feb 09, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shout: use libshout's synchronization
Removed the manual timer synchronization from the shout plugin. libshout's shout_sync() function does it for us.
parent
f6455d5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
24 deletions
+5
-24
NEWS
NEWS
+1
-0
shout_plugin.c
src/output/shout_plugin.c
+4
-21
shout_plugin.h
src/output/shout_plugin.h
+0
-3
No files found.
NEWS
View file @
f5c43889
...
...
@@ -48,6 +48,7 @@ ver 0.14.2 (2009/??/??)
- jack: reduced sleep time to 1ms
- shout: fixed memory leak in the mp3 encoder
- shout: switch to blocking mode
- shout: use libshout's synchronization
* mapper: remove trailing slashes from music_directory
* player: set player error when output device fails
...
...
src/output/shout_plugin.c
View file @
f5c43889
...
...
@@ -59,7 +59,6 @@ static struct shout_data *new_shout_data(void)
ret
->
bitrate
=
-
1
;
ret
->
quality
=
-
2
.
0
;
ret
->
timeout
=
DEFAULT_CONN_TIMEOUT
;
ret
->
timer
=
NULL
;
ret
->
buf
.
len
=
0
;
return
ret
;
...
...
@@ -73,8 +72,6 @@ static void free_shout_data(struct shout_data *sd)
shout_free
(
sd
->
shout_conn
);
if
(
sd
->
tag
)
tag_free
(
sd
->
tag
);
if
(
sd
->
timer
)
timer_free
(
sd
->
timer
);
g_free
(
sd
);
}
...
...
@@ -325,8 +322,8 @@ static void my_shout_finish_driver(void *data)
static
void
my_shout_drop_buffered_audio
(
void
*
data
)
{
G_GNUC_UNUSED
struct
shout_data
*
sd
=
(
struct
shout_data
*
)
data
;
timer_reset
(
sd
->
timer
);
/* needs to be implemented for shout */
}
...
...
@@ -336,11 +333,6 @@ static void my_shout_close_device(void *data)
struct
shout_data
*
sd
=
(
struct
shout_data
*
)
data
;
close_shout_conn
(
sd
);
if
(
sd
->
timer
)
{
timer_free
(
sd
->
timer
);
sd
->
timer
=
NULL
;
}
}
static
int
shout_connect
(
struct
shout_data
*
sd
)
...
...
@@ -380,19 +372,15 @@ static int open_shout_conn(void *data)
return
0
;
}
static
bool
my_shout_open_device
(
void
*
data
,
struct
audio_format
*
audio_format
)
static
bool
my_shout_open_device
(
void
*
data
,
G_GNUC_UNUSED
struct
audio_format
*
audio_format
)
{
struct
shout_data
*
sd
=
(
struct
shout_data
*
)
data
;
if
(
open_shout_conn
(
sd
)
<
0
)
return
false
;
if
(
sd
->
timer
)
timer_free
(
sd
->
timer
);
sd
->
timer
=
timer_new
(
audio_format
);
return
true
;
}
...
...
@@ -420,11 +408,6 @@ my_shout_play(void *data, const char *chunk, size_t size)
{
struct
shout_data
*
sd
=
(
struct
shout_data
*
)
data
;
if
(
!
sd
->
timer
->
started
)
timer_start
(
sd
->
timer
);
timer_add
(
sd
->
timer
,
size
);
if
(
sd
->
tag
!=
NULL
)
send_metadata
(
sd
);
...
...
src/output/shout_plugin.h
View file @
f5c43889
...
...
@@ -21,7 +21,6 @@
#include "../output_api.h"
#include "../conf.h"
#include "../timer.h"
#include <shout/shout.h>
#include <glib.h>
...
...
@@ -72,8 +71,6 @@ struct shout_data {
int
timeout
;
Timer
*
timer
;
/* the configured audio format */
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