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
c87b9cf4
Commit
c87b9cf4
authored
Feb 02, 2005
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playing, stopping, and seeking mpc files should work now. next is parsing metadata for the db.
git-svn-id:
https://svn.musicpd.org/mpd/trunk@2924
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
3d671eca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
mpc_plugin.c
src/inputPlugins/mpc_plugin.c
+11
-6
No files found.
src/inputPlugins/mpc_plugin.c
View file @
c87b9cf4
...
...
@@ -60,7 +60,7 @@ mpc_int32_t mpc_read_cb(void * vdata, void * ptr, mpc_int32_t size) {
static
mpc_bool_t
mpc_seek_cb
(
void
*
vdata
,
mpc_int32_t
offset
)
{
MpcCallbackData
*
data
=
(
MpcCallbackData
*
)
vdata
;
return
!
seekInputStream
(
data
->
inStream
,
offset
,
SEEK_SET
)
;
return
seekInputStream
(
data
->
inStream
,
offset
,
SEEK_SET
)
<
0
?
0
:
1
;
}
mpc_int32_t
mpc_tell_cb
(
void
*
vdata
)
{
...
...
@@ -149,7 +149,6 @@ int mpc_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
closeInputStream
(
inStream
);
if
(
!
dc
->
stop
)
{
ERROR
(
"Not a valid musepack stream"
);
DEBUG
(
"ret: %i
\n
"
,
ret
);
return
-
1
;
}
else
{
...
...
@@ -185,7 +184,7 @@ int mpc_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
while
(
!
eof
)
{
if
(
dc
->
seek
)
{
samplePos
=
dc
->
seekWhere
*
dc
->
audioFormat
.
sampleRate
;
if
(
0
==
mpc_decoder_seek_sample
(
&
decoder
,
samplePos
))
{
if
(
mpc_decoder_seek_sample
(
&
decoder
,
samplePos
))
{
clearOutputBuffer
(
cb
);
chunkpos
=
0
;
}
...
...
@@ -193,10 +192,12 @@ int mpc_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
dc
->
seek
=
0
;
}
DEBUG
(
"HERE 1
\n
"
);
ret
=
mpc_decoder_decode
(
&
decoder
,
sample_buffer
,
&
vbrUpdateAcc
,
&
vbrUpdateBits
);
DEBUG
(
"HERE 2
\n
"
);
if
(
ret
<=
0
)
{
if
(
ret
<=
0
||
dc
->
stop
)
{
eof
=
1
;
break
;
}
...
...
@@ -228,7 +229,10 @@ int mpc_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
NULL
);
chunkpos
=
0
;
s16
=
(
mpd_sint16
*
)
chunk
;
if
(
dc
->
stop
)
break
;
if
(
dc
->
stop
)
{
eof
=
1
;
break
;
}
}
}
}
...
...
@@ -246,12 +250,13 @@ int mpc_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
closeInputStream
(
inStream
);
flushOutputBuffer
(
cb
);
if
(
dc
->
stop
)
{
dc
->
state
=
DECODE_STATE_STOP
;
dc
->
stop
=
0
;
}
else
{
flushOutputBuffer
(
cb
);
dc
->
state
=
DECODE_STATE_STOP
;
}
...
...
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