aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decoder_api.c1
-rw-r--r--src/inputPlugins/audiofile_plugin.c3
-rw-r--r--src/inputPlugins/wavpack_plugin.c3
-rw-r--r--src/outputBuffer.c3
-rw-r--r--src/outputBuffer.h6
-rw-r--r--src/playerData.c2
-rw-r--r--src/playerData.h2
7 files changed, 14 insertions, 6 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 6d8ce087a..f6119aa02 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -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)
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index 2fbe580fa..c3046770b 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -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;
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 7a37e69b2..2253feb41 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -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 {
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index e500e6860..0efc5d16a 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -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);
diff --git a/src/outputBuffer.h b/src/outputBuffer.h
index 624b6dbc7..512334d90 100644
--- a/src/outputBuffer.h
+++ b/src/outputBuffer.h
@@ -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);
diff --git a/src/playerData.c b/src/playerData.c
index 81c6f7fe7..d72f2fe17 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -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)
{
diff --git a/src/playerData.h b/src/playerData.h
index 81b80cf7d..a469ffaca 100644
--- a/src/playerData.h
+++ b/src/playerData.h
@@ -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);