moved global variable "pc" to player.h
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.
This commit is contained in:
parent
a94845ee00
commit
4255bba0f7
@ -130,6 +130,7 @@ mpd_SOURCES = \
|
|||||||
pcm_utils.c \
|
pcm_utils.c \
|
||||||
permission.c \
|
permission.c \
|
||||||
player.c \
|
player.c \
|
||||||
|
player_control.c \
|
||||||
player_thread.c \
|
player_thread.c \
|
||||||
playerData.c \
|
playerData.c \
|
||||||
playlist.c \
|
playlist.c \
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
#include "decode.h"
|
#include "decode.h"
|
||||||
#include "decoder_internal.h"
|
#include "decoder_internal.h"
|
||||||
|
#include "player.h"
|
||||||
|
|
||||||
#include "playerData.h"
|
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "ls.h"
|
#include "ls.h"
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
#include "decoder_internal.h"
|
#include "decoder_internal.h"
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
#include "decode.h"
|
#include "decode.h"
|
||||||
|
#include "player.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "normalize.h"
|
#include "normalize.h"
|
||||||
#include "playerData.h"
|
|
||||||
#include "outputBuffer.h"
|
#include "outputBuffer.h"
|
||||||
#include "gcc.h"
|
#include "gcc.h"
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
#include "decoder_api.h"
|
#include "decoder_api.h"
|
||||||
|
#include "list.h"
|
||||||
|
|
||||||
extern struct decoder_plugin mp3Plugin;
|
extern struct decoder_plugin mp3Plugin;
|
||||||
extern struct decoder_plugin oggvorbisPlugin;
|
extern struct decoder_plugin oggvorbisPlugin;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "playerData.h"
|
#include "playerData.h"
|
||||||
#include "decode.h"
|
#include "decode.h"
|
||||||
|
#include "player.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include "sig_handlers.h"
|
#include "sig_handlers.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "player_thread.h"
|
#include "player_thread.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "playerData.h"
|
|
||||||
#include "ack.h"
|
#include "ack.h"
|
||||||
#include "os_compat.h"
|
#include "os_compat.h"
|
||||||
#include "main_notify.h"
|
#include "main_notify.h"
|
||||||
|
@ -79,7 +79,7 @@ enum player_queue_state {
|
|||||||
#define PLAYER_QUEUE_UNLOCKED 0
|
#define PLAYER_QUEUE_UNLOCKED 0
|
||||||
#define PLAYER_QUEUE_LOCKED 1
|
#define PLAYER_QUEUE_LOCKED 1
|
||||||
|
|
||||||
typedef struct _PlayerControl {
|
struct player_control {
|
||||||
Notify notify;
|
Notify notify;
|
||||||
volatile enum player_command command;
|
volatile enum player_command command;
|
||||||
volatile enum player_state state;
|
volatile enum player_state state;
|
||||||
@ -99,7 +99,9 @@ typedef struct _PlayerControl {
|
|||||||
volatile float crossFade;
|
volatile float crossFade;
|
||||||
volatile mpd_uint16 softwareVolume;
|
volatile mpd_uint16 softwareVolume;
|
||||||
volatile double totalPlayTime;
|
volatile double totalPlayTime;
|
||||||
} PlayerControl;
|
};
|
||||||
|
|
||||||
|
extern struct player_control pc;
|
||||||
|
|
||||||
void player_command_finished(void);
|
void player_command_finished(void);
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "playerData.h"
|
#include "playerData.h"
|
||||||
#include "decode.h"
|
#include "decode.h"
|
||||||
|
#include "player.h"
|
||||||
#include "outputBuffer.h"
|
#include "outputBuffer.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@ -27,7 +28,6 @@
|
|||||||
#define DEFAULT_BUFFER_BEFORE_PLAY 10
|
#define DEFAULT_BUFFER_BEFORE_PLAY 10
|
||||||
|
|
||||||
unsigned int buffered_before_play;
|
unsigned int buffered_before_play;
|
||||||
PlayerControl pc;
|
|
||||||
|
|
||||||
void initPlayerData(void)
|
void initPlayerData(void)
|
||||||
{
|
{
|
||||||
|
@ -19,10 +19,7 @@
|
|||||||
#ifndef PLAYER_DATA_H
|
#ifndef PLAYER_DATA_H
|
||||||
#define PLAYER_DATA_H
|
#define PLAYER_DATA_H
|
||||||
|
|
||||||
#include "player.h"
|
|
||||||
|
|
||||||
extern unsigned int buffered_before_play;
|
extern unsigned int buffered_before_play;
|
||||||
extern PlayerControl pc;
|
|
||||||
|
|
||||||
void initPlayerData(void);
|
void initPlayerData(void);
|
||||||
|
|
||||||
|
21
src/player_control.c
Normal file
21
src/player_control.c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/* the Music Player Daemon (MPD)
|
||||||
|
* Copyright (C) 2008 Max Kellermann <max@duempel.org>
|
||||||
|
* This project's homepage is: http://www.musicpd.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "player.h"
|
||||||
|
|
||||||
|
struct player_control pc;
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "player_thread.h"
|
#include "player_thread.h"
|
||||||
|
#include "player.h"
|
||||||
#include "playerData.h"
|
#include "playerData.h"
|
||||||
#include "decode.h"
|
#include "decode.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user