Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a196714e
Commit
a196714e
authored
Jul 30, 2005
by
Eric Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update musepack decoding code to use the newer mpcdec library
libmusepack is deprecated git-svn-id:
https://svn.musicpd.org/mpd/trunk@3408
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
fb175591
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
configure.ac
configure.ac
+17
-17
mpc_plugin.c
src/inputPlugins/mpc_plugin.c
+4
-4
No files found.
configure.ac
View file @
a196714e
...
...
@@ -276,38 +276,38 @@ if test x$enable_mp3 = xyes; then
fi
if test x$enable_mpc = xyes; then
if test "x$m
usepack
_libraries" != "x" ; then
M
USEPACK_LIBS="-L$musepack
_libraries"
elif test "x$m
usepack
_prefix" != "x" ; then
M
USEPACK
_LIBS="-L$faad_prefix/lib"
if test "x$m
pcdec
_libraries" != "x" ; then
M
PCDEC_LIBS="-L$mpcdec
_libraries"
elif test "x$m
pcdec
_prefix" != "x" ; then
M
PCDEC
_LIBS="-L$faad_prefix/lib"
elif test "x$prefix" != "xNONE"; then
M
USEPACK
_LIBS="-L$libdir"
M
PCDEC
_LIBS="-L$libdir"
fi
M
USEPACK_LIBS="$MUSEPACK_LIBS -lmusepack
"
M
PCDEC_LIBS="$MPCDEC_LIBS -lmpcdec
"
if test "x$m
usepack
_includes" != "x" ; then
M
USEPACK_CFLAGS="-I$musepack
_includes"
elif test "x$m
usepack
_prefix" != "x" ; then
M
USEPACK_CFLAGS="-I$musepack
_prefix/include"
if test "x$m
pcdec
_includes" != "x" ; then
M
PCDEC_CFLAGS="-I$mpcdec
_includes"
elif test "x$m
pcdec
_prefix" != "x" ; then
M
PCDEC_CFLAGS="-I$mpcdec
_prefix/include"
elif test "x$prefix" != "xNONE"; then
M
USEPACK
_CFLAGS="-I$includedir"
M
PCDEC
_CFLAGS="-I$includedir"
fi
oldcflags=$CFLAGS
oldlibs=$LIBS
oldcppflags=$CPPFLAGS
CFLAGS="$CFLAGS $MPD_CFLAGS $M
USEPACK
_CFLAGS -I."
LIBS="$LIBS $MPD_LIBS $M
USEPACK
_LIBS"
CFLAGS="$CFLAGS $MPD_CFLAGS $M
PCDEC
_CFLAGS -I."
LIBS="$LIBS $MPD_LIBS $M
PCDEC
_LIBS"
CPPFLAGS=$CFLAGS
AC_CHECK_HEADER(m
usepack/musepack
.h,,enable_mpc=no)
AC_CHECK_HEADER(m
pcdec/mpcdec
.h,,enable_mpc=no)
if test x$enable_mpc = xyes; then
AC_CHECK_LIB(m
usepack,main,[MPD_LIBS="$MPD_LIBS $MUSEPACK_LIBS";MPD_CFLAGS="$MPD_CFLAGS $MUSEPACK
_CFLAGS";],enable_mpc=no)
AC_CHECK_LIB(m
pcdec,main,[MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";MPD_CFLAGS="$MPD_CFLAGS $MPCDEC
_CFLAGS";],enable_mpc=no)
fi
if test x$enable_mpc = xyes; then
AC_DEFINE(HAVE_M
USEPACK,1,[Define to use libmusepack
for MPC decoding])
AC_DEFINE(HAVE_M
PCDEC,1,[Define to use libmpcdec
for MPC decoding])
else
AC_MSG_WARN([m
usepack
lib needed for MPC support -- disabling MPC support])
AC_MSG_WARN([m
pcdec
lib needed for MPC support -- disabling MPC support])
fi
CFLAGS=$oldcflags
LIBS=$oldlibs
...
...
src/inputPlugins/mpc_plugin.c
View file @
a196714e
...
...
@@ -18,7 +18,7 @@
#include "../inputPlugin.h"
#ifdef HAVE_M
USEPACK
#ifdef HAVE_M
PCDEC
#include "../utils.h"
#include "../audio.h"
...
...
@@ -32,7 +32,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <m
usepack/musepack
.h>
#include <m
pcdec/mpcdec
.h>
#include <errno.h>
#include <math.h>
...
...
@@ -58,7 +58,7 @@ static mpc_int32_t mpc_read_cb(void * vdata, void * ptr, mpc_int32_t size) {
return
ret
;
}
static
BOOL
mpc_seek_cb
(
void
*
vdata
,
mpc_int32_t
offset
)
{
static
mpc_bool_t
mpc_seek_cb
(
void
*
vdata
,
mpc_int32_t
offset
)
{
MpcCallbackData
*
data
=
(
MpcCallbackData
*
)
vdata
;
return
seekInputStream
(
data
->
inStream
,
offset
,
SEEK_SET
)
<
0
?
0
:
1
;
...
...
@@ -70,7 +70,7 @@ static mpc_int32_t mpc_tell_cb(void * vdata) {
return
(
long
)(
data
->
inStream
->
offset
);
}
static
BOOL
mpc_canseek_cb
(
void
*
vdata
)
{
static
mpc_bool_t
mpc_canseek_cb
(
void
*
vdata
)
{
MpcCallbackData
*
data
=
(
MpcCallbackData
*
)
vdata
;
return
data
->
inStream
->
seekable
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment