player: added player_get_audio_format()
player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
This commit is contained in:
parent
0b4dfae22e
commit
5de7521900
@ -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())) {
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user