summaryrefslogtreecommitdiff
path: root/src/libmusepack
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@users.sourceforge.net>2005-01-30 14:41:34 +0000
committerFrantišek Dvořák <valtri@users.sourceforge.net>2005-01-30 14:41:34 +0000
commite2ea766a40e939d5a21431e64153c10c40ee48d1 (patch)
tree05892bff9ec9cfdad24a2add7ad5eb3b38ffd00e /src/libmusepack
parent98ec149da4451676a744ac6973027ed741c4708b (diff)
downloadxine-lib-e2ea766a40e939d5a21431e64153c10c40ee48d1.tar.gz
xine-lib-e2ea766a40e939d5a21431e64153c10c40ee48d1.tar.bz2
**BUGFIX**
Import WIN32 compile fix from musepack SVN. CVS patchset: 7372 CVS date: 2005/01/30 14:41:34
Diffstat (limited to 'src/libmusepack')
-rw-r--r--src/libmusepack/mpc_decoder.c10
-rw-r--r--src/libmusepack/mpc_reader.c4
-rw-r--r--src/libmusepack/musepack/config_types.h2
-rw-r--r--src/libmusepack/musepack/musepack.h6
-rw-r--r--src/libmusepack/musepack/reader.h6
-rw-r--r--src/libmusepack/xine_decoder.c6
6 files changed, 17 insertions, 17 deletions
diff --git a/src/libmusepack/mpc_decoder.c b/src/libmusepack/mpc_decoder.c
index d8c2e4fad..827dda6dc 100644
--- a/src/libmusepack/mpc_decoder.c
+++ b/src/libmusepack/mpc_decoder.c
@@ -61,7 +61,7 @@ void mpc_decoder_init_huffman_sv7(mpc_decoder *d);
void mpc_decoder_read_bitstream_sv6(mpc_decoder *d);
void mpc_decoder_read_bitstream_sv7(mpc_decoder *d);
void mpc_decoder_update_buffer(mpc_decoder *d, mpc_uint32_t RING);
-BOOL mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample);
+mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample);
void mpc_decoder_requantisierung(mpc_decoder *d, const mpc_int32_t Last_Band);
//------------------------------------------------------------------------------
@@ -72,7 +72,7 @@ static mpc_int32_t f_read(mpc_decoder *d, void *ptr, size_t size)
return d->r->read(d->r->data, ptr, size);
};
-static BOOL f_seek(mpc_decoder *d, mpc_int32_t offset)
+static mpc_bool_t f_seek(mpc_decoder *d, mpc_int32_t offset)
{
return d->r->seek(d->r->data, offset);
};
@@ -1191,7 +1191,7 @@ static void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si)
d->samples_to_skip = MPC_DECODER_SYNTH_DELAY;
}
-BOOL mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si)
+mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si)
{
mpc_decoder_set_streaminfo(d, si);
@@ -1264,12 +1264,12 @@ static mpc_uint32_t get_initial_fpos(mpc_decoder *d, mpc_uint32_t StreamVersion)
return fpos;
}
-BOOL mpc_decoder_seek_seconds(mpc_decoder *d, double seconds)
+mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *d, double seconds)
{
return mpc_decoder_seek_sample(d, (mpc_int64_t)(seconds * (double)d->SampleRate + 0.5));
}
-BOOL mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
+mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
{
mpc_uint32_t fpos;
mpc_uint32_t fwd;
diff --git a/src/libmusepack/mpc_reader.c b/src/libmusepack/mpc_reader.c
index d1719f916..5ed913698 100644
--- a/src/libmusepack/mpc_reader.c
+++ b/src/libmusepack/mpc_reader.c
@@ -46,7 +46,7 @@ read_impl(void *data, void *ptr, mpc_int32_t size)
return fread(ptr, 1, size, d->file);
}
-static BOOL
+static mpc_bool_t
seek_impl(void *data, int offset)
{
mpc_reader *d = (mpc_reader *) data;
@@ -70,7 +70,7 @@ get_size_impl(void *data)
return d->file_size;
}
-static BOOL
+static mpc_bool_t
canseek_impl(void *data)
{
mpc_reader *d = (mpc_reader *) data;
diff --git a/src/libmusepack/musepack/config_types.h b/src/libmusepack/musepack/config_types.h
index 4ea88272c..164e73ebc 100644
--- a/src/libmusepack/musepack/config_types.h
+++ b/src/libmusepack/musepack/config_types.h
@@ -9,7 +9,7 @@
#define MPC_LITTLE_ENDIAN
#endif
-typedef unsigned char BOOL;
+typedef unsigned char mpc_bool_t;
#define TRUE 1
#define FALSE 0
diff --git a/src/libmusepack/musepack/musepack.h b/src/libmusepack/musepack/musepack.h
index b84cf3513..dfbf0a36d 100644
--- a/src/libmusepack/musepack/musepack.h
+++ b/src/libmusepack/musepack/musepack.h
@@ -60,7 +60,7 @@ void mpc_decoder_setup(mpc_decoder *d, mpc_reader *r);
/// Call this next after calling mpc_decoder_setup.
/// \param si streaminfo structure indicating format of source stream
/// \return TRUE if decoder was initalized successfully, FALSE otherwise
-BOOL mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si);
+mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si);
/// Sets decoder sample scaling factor. All decoded samples will be multiplied
/// by this factor.
@@ -82,10 +82,10 @@ mpc_uint32_t mpc_decoder_decode(
mpc_uint32_t *vbr_update_bits);
/// Seeks to the specified sample in the source stream.
-BOOL mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample);
+mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample);
/// Seeks to specified position in seconds in the source stream.
-BOOL mpc_decoder_seek_seconds(mpc_decoder *d, double seconds);
+mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *d, double seconds);
#ifdef __cplusplus
}
diff --git a/src/libmusepack/musepack/reader.h b/src/libmusepack/musepack/reader.h
index 00aae830d..2f29f97e4 100644
--- a/src/libmusepack/musepack/reader.h
+++ b/src/libmusepack/musepack/reader.h
@@ -13,7 +13,7 @@ typedef struct mpc_reader_t {
mpc_int32_t (*read)(void *t, void *ptr, mpc_int32_t size);
/// Seeks to byte position offset.
- BOOL (*seek)(void *t, mpc_int32_t offset);
+ mpc_bool_t (*seek)(void *t, mpc_int32_t offset);
/// Returns the current byte offset in the stream.
mpc_int32_t (*tell)(void *t);
@@ -22,7 +22,7 @@ typedef struct mpc_reader_t {
mpc_int32_t (*get_size)(void *t);
/// True if the stream is a seekable stream.
- BOOL (*canseek)(void *t);
+ mpc_bool_t (*canseek)(void *t);
/// Optional field that can be used to identify a particular instance of
/// reader or carry along data associated with that reader.
@@ -33,7 +33,7 @@ typedef struct mpc_reader_t {
// malloc/free.
FILE *file;
long file_size;
- BOOL is_seekable;
+ mpc_bool_t is_seekable;
} mpc_reader;
/// Initializes reader with default stdio file reader implementation. Use
diff --git a/src/libmusepack/xine_decoder.c b/src/libmusepack/xine_decoder.c
index 2e9e53f38..6d862d4c7 100644
--- a/src/libmusepack/xine_decoder.c
+++ b/src/libmusepack/xine_decoder.c
@@ -23,7 +23,7 @@
* 32bit float output
* Seeking??
*
- * $Id: xine_decoder.c,v 1.3 2005/01/29 18:33:53 jstembridge Exp $
+ * $Id: xine_decoder.c,v 1.4 2005/01/30 14:41:34 valtri Exp $
*/
#include <stdio.h>
@@ -106,7 +106,7 @@ static int32_t mpc_reader_read(void *data, void *ptr, int32_t size) {
}
/* Seeks to byte position offset. */
-static BOOL mpc_reader_seek(void *data, int32_t offset) {
+static mpc_bool_t mpc_reader_seek(void *data, int32_t offset) {
mpc_decoder_t *this = (mpc_decoder_t *) data;
lprintf("mpc_reader_seek: offset=%d\n", offset);
@@ -136,7 +136,7 @@ static int32_t mpc_reader_get_size(void *data) {
}
/* True if the stream is a seekable stream. */
-static BOOL mpc_reader_canseek(void *data) {
+static mpc_bool_t mpc_reader_canseek(void *data) {
lprintf("mpc_reader_canseek\n");
return TRUE;