moved global variable "ob" to outputBuffer.h

This releases several include file dependencies.  As a side effect,
"CHUNK_SIZE" isn't defined by decoder_api.h anymore, so we have to
define it directly in the plugins which need it.  It just isn't worth
it to add it to the decoder plugin API.
This commit is contained in:
Max Kellermann 2008-08-26 08:41:05 +02:00
parent 15c9352bb6
commit a94845ee00
7 changed files with 14 additions and 6 deletions

View File

@ -25,6 +25,7 @@
#include "utils.h"
#include "normalize.h"
#include "playerData.h"
#include "outputBuffer.h"
#include "gcc.h"
void decoder_plugin_register(struct decoder_plugin *plugin)

View File

@ -26,6 +26,9 @@
#include <audiofile.h>
/* pick 1020 since its devisible for 8,16,24, and 32-bit audio */
#define CHUNK_SIZE 1020
static int getAudiofileTotalTime(char *file)
{
int total_time;

View File

@ -28,6 +28,9 @@
#include <wavpack/wavpack.h>
/* pick 1020 since its devisible for 8,16,24, and 32-bit audio */
#define CHUNK_SIZE 1020
#define ERRORLEN 80
static struct {

View File

@ -17,10 +17,11 @@
*/
#include "outputBuffer.h"
#include "playerData.h"
#include "utils.h"
struct output_buffer ob;
void ob_init(unsigned int size, Notify *notify)
{
assert(size > 0);

View File

@ -36,7 +36,7 @@ typedef struct _OutputBufferChunk {
* A ring set of buffers where the decoder appends data after the end,
* and the player consumes data from the beginning.
*/
typedef struct _OutputBuffer {
struct output_buffer {
ob_chunk *chunks;
unsigned int size;
@ -54,7 +54,9 @@ typedef struct _OutputBuffer {
AudioFormat audioFormat;
Notify *notify;
} OutputBuffer;
};
extern struct output_buffer ob;
void ob_init(unsigned int size, Notify *notify);

View File

@ -18,6 +18,7 @@
#include "playerData.h"
#include "decode.h"
#include "outputBuffer.h"
#include "conf.h"
#include "log.h"
#include "utils.h"
@ -27,7 +28,6 @@
unsigned int buffered_before_play;
PlayerControl pc;
OutputBuffer ob;
void initPlayerData(void)
{

View File

@ -20,11 +20,9 @@
#define PLAYER_DATA_H
#include "player.h"
#include "outputBuffer.h"
extern unsigned int buffered_before_play;
extern PlayerControl pc;
extern OutputBuffer ob;
void initPlayerData(void);