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
310895f0
Commit
310895f0
authored
Jul 25, 2011
by
Jonathan Neuschäfer
Committed by
Max Kellermann
Aug 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename 'Timer' to 'struct timer'
parent
4428894a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
24 deletions
+24
-24
fluidsynth_decoder_plugin.c
src/decoder/fluidsynth_decoder_plugin.c
+1
-1
fifo_output_plugin.c
src/output/fifo_output_plugin.c
+1
-1
httpd_internal.h
src/output/httpd_internal.h
+2
-2
null_plugin.c
src/output/null_plugin.c
+2
-2
openal_plugin.c
src/output/openal_plugin.c
+1
-1
timer.c
src/timer.c
+8
-8
timer.h
src/timer.h
+9
-9
No files found.
src/decoder/fluidsynth_decoder_plugin.c
View file @
310895f0
...
...
@@ -102,7 +102,7 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
fluid_player_t
*
player
;
char
*
path_dup
;
int
ret
;
T
imer
*
timer
;
struct
t
imer
*
timer
;
enum
decoder_command
cmd
;
soundfont_path
=
...
...
src/output/fifo_output_plugin.c
View file @
310895f0
...
...
@@ -42,7 +42,7 @@ struct fifo_data {
int
input
;
int
output
;
bool
created
;
T
imer
*
timer
;
struct
t
imer
*
timer
;
};
/**
...
...
src/output/httpd_internal.h
View file @
310895f0
...
...
@@ -65,10 +65,10 @@ struct httpd_output {
GMutex
*
mutex
;
/**
* A #
T
imer object to synchronize this output with the
* A #
t
imer object to synchronize this output with the
* wallclock.
*/
T
imer
*
timer
;
struct
t
imer
*
timer
;
/**
* The listener socket.
...
...
src/output/null_plugin.c
View file @
310895f0
...
...
@@ -28,7 +28,7 @@
struct
null_data
{
bool
sync
;
T
imer
*
timer
;
struct
t
imer
*
timer
;
};
static
void
*
...
...
@@ -82,7 +82,7 @@ null_play(void *data, G_GNUC_UNUSED const void *chunk, size_t size,
G_GNUC_UNUSED
GError
**
error
)
{
struct
null_data
*
nd
=
data
;
T
imer
*
timer
=
nd
->
timer
;
struct
t
imer
*
timer
=
nd
->
timer
;
if
(
!
nd
->
sync
)
return
size
;
...
...
src/output/openal_plugin.c
View file @
310895f0
...
...
@@ -41,7 +41,7 @@ struct openal_data {
const
char
*
device_name
;
ALCdevice
*
device
;
ALCcontext
*
context
;
T
imer
*
timer
;
struct
t
imer
*
timer
;
ALuint
buffers
[
NUM_BUFFERS
];
int
filled
;
ALuint
source
;
...
...
src/timer.c
View file @
310895f0
...
...
@@ -37,9 +37,9 @@ static uint64_t now(void)
return
((
uint64_t
)
tv
.
tv_sec
*
1000000
)
+
tv
.
tv_usec
;
}
T
imer
*
timer_new
(
const
struct
audio_format
*
af
)
struct
t
imer
*
timer_new
(
const
struct
audio_format
*
af
)
{
Timer
*
timer
=
g_new
(
T
imer
,
1
);
struct
timer
*
timer
=
g_new
(
struct
t
imer
,
1
);
timer
->
time
=
0
;
timer
->
started
=
0
;
timer
->
rate
=
af
->
sample_rate
*
audio_format_frame_size
(
af
);
...
...
@@ -47,24 +47,24 @@ Timer *timer_new(const struct audio_format *af)
return
timer
;
}
void
timer_free
(
T
imer
*
timer
)
void
timer_free
(
struct
t
imer
*
timer
)
{
g_free
(
timer
);
}
void
timer_start
(
T
imer
*
timer
)
void
timer_start
(
struct
t
imer
*
timer
)
{
timer
->
time
=
now
();
timer
->
started
=
1
;
}
void
timer_reset
(
T
imer
*
timer
)
void
timer_reset
(
struct
t
imer
*
timer
)
{
timer
->
time
=
0
;
timer
->
started
=
0
;
}
void
timer_add
(
T
imer
*
timer
,
int
size
)
void
timer_add
(
struct
t
imer
*
timer
,
int
size
)
{
assert
(
timer
->
started
);
...
...
@@ -72,7 +72,7 @@ void timer_add(Timer *timer, int size)
}
unsigned
timer_delay
(
const
T
imer
*
timer
)
timer_delay
(
const
struct
t
imer
*
timer
)
{
int64_t
delay
=
(
int64_t
)(
timer
->
time
-
now
())
/
1000
;
if
(
delay
<
0
)
...
...
@@ -84,7 +84,7 @@ timer_delay(const Timer *timer)
return
delay
/
1000
;
}
void
timer_sync
(
T
imer
*
timer
)
void
timer_sync
(
struct
t
imer
*
timer
)
{
int64_t
sleep_duration
;
...
...
src/timer.h
View file @
310895f0
...
...
@@ -24,28 +24,28 @@
struct
audio_format
;
typedef
struct
_T
imer
{
struct
t
imer
{
uint64_t
time
;
int
started
;
int
rate
;
}
Timer
;
};
T
imer
*
timer_new
(
const
struct
audio_format
*
af
);
struct
t
imer
*
timer_new
(
const
struct
audio_format
*
af
);
void
timer_free
(
T
imer
*
timer
);
void
timer_free
(
struct
t
imer
*
timer
);
void
timer_start
(
T
imer
*
timer
);
void
timer_start
(
struct
t
imer
*
timer
);
void
timer_reset
(
T
imer
*
timer
);
void
timer_reset
(
struct
t
imer
*
timer
);
void
timer_add
(
T
imer
*
timer
,
int
size
);
void
timer_add
(
struct
t
imer
*
timer
,
int
size
);
/**
* Returns the number of milliseconds to sleep to get back to sync.
*/
unsigned
timer_delay
(
const
T
imer
*
timer
);
timer_delay
(
const
struct
t
imer
*
timer
);
void
timer_sync
(
T
imer
*
timer
);
void
timer_sync
(
struct
t
imer
*
timer
);
#endif
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