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
5de75219
Commit
5de75219
authored
Oct 10, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player: added player_get_audio_format()
player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
parent
0b4dfae2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
22 deletions
+8
-22
command.c
src/command.c
+3
-2
player_control.c
src/player_control.c
+0
-15
player_control.h
src/player_control.h
+5
-5
No files found.
src/command.c
View file @
5de75219
...
...
@@ -399,15 +399,16 @@ static int commandStatus(struct client *client,
COMMAND_STATUS_SONGID
": %i
\n
"
,
song
,
getPlaylistSongId
(
song
));
}
if
(
getPlayerState
()
!=
PLAYER_STATE_STOP
)
{
const
struct
audio_format
*
af
=
player_get_audio_format
();
client_printf
(
client
,
COMMAND_STATUS_TIME
": %i:%i
\n
"
COMMAND_STATUS_BITRATE
": %li
\n
"
COMMAND_STATUS_AUDIO
": %u:%u:%u
\n
"
,
getPlayerElapsedTime
(),
getPlayerTotalTime
(),
getPlayerBitRate
(),
getPlayerSampleRate
(),
getPlayerBits
(),
getPlayerChannels
());
af
->
sample_rate
,
af
->
bits
,
af
->
channels
);
}
if
((
updateJobId
=
isUpdatingDB
()))
{
...
...
src/player_control.c
View file @
5de75219
...
...
@@ -254,21 +254,6 @@ double getPlayerTotalPlayTime(void)
return
pc
.
totalPlayTime
;
}
unsigned
int
getPlayerSampleRate
(
void
)
{
return
pc
.
audio_format
.
sample_rate
;
}
unsigned
getPlayerBits
(
void
)
{
return
pc
.
audio_format
.
bits
;
}
unsigned
getPlayerChannels
(
void
)
{
return
pc
.
audio_format
.
channels
;
}
/* this actually creates a dupe of the current metadata */
struct
song
*
playerCurrentDecodeSong
(
void
)
...
...
src/player_control.h
View file @
5de75219
...
...
@@ -154,11 +154,11 @@ void setPlayerSoftwareVolume(int volume);
double
getPlayerTotalPlayTime
(
void
);
unsigned
int
getPlayerSampleRate
(
void
);
unsigned
getPlayerBits
(
void
);
unsigned
getPlayerChannels
(
void
);
static
inline
const
struct
audio_format
*
player_get_audio_format
(
void
)
{
return
&
pc
.
audio_format
;
}
struct
song
*
playerCurrentDecodeSong
(
void
);
...
...
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