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
42a1a76e
Commit
42a1a76e
authored
May 29, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix TIcho's seeking while paused bug
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1225
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
ccfff4f0
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
11 deletions
+21
-11
aac_decode.c
src/aac_decode.c
+1
-1
audiofile_decode.c
src/audiofile_decode.c
+1
-0
flac_decode.c
src/flac_decode.c
+1
-1
mp3_decode.c
src/mp3_decode.c
+2
-1
mp4_decode.c
src/mp4_decode.c
+2
-1
ogg_decode.c
src/ogg_decode.c
+4
-3
outputBuffer.c
src/outputBuffer.c
+8
-2
outputBuffer.h
src/outputBuffer.h
+2
-2
No files found.
src/aac_decode.c
View file @
42a1a76e
...
@@ -362,7 +362,7 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) {
...
@@ -362,7 +362,7 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) {
sampleBufferLen
=
sampleCount
*
2
;
sampleBufferLen
=
sampleCount
*
2
;
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
sampleBuffer
,
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
0
,
sampleBuffer
,
sampleBufferLen
,
time
,
bitRate
);
sampleBufferLen
,
time
,
bitRate
);
if
(
dc
->
seek
)
dc
->
seek
=
0
;
if
(
dc
->
seek
)
dc
->
seek
=
0
;
else
if
(
dc
->
stop
)
{
else
if
(
dc
->
stop
)
{
...
...
src/audiofile_decode.c
View file @
42a1a76e
...
@@ -112,6 +112,7 @@ int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) {
...
@@ -112,6 +112,7 @@ int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) {
sendDataToOutputBuffer
(
cb
,
sendDataToOutputBuffer
(
cb
,
NULL
,
NULL
,
dc
,
dc
,
1
,
chunk
,
chunk
,
ret
*
fs
,
ret
*
fs
,
(
float
)
current
/
(
float
)
current
/
...
...
src/flac_decode.c
View file @
42a1a76e
...
@@ -376,7 +376,7 @@ int flacSendChunk(FlacData * data) {
...
@@ -376,7 +376,7 @@ int flacSendChunk(FlacData * data) {
doReplayGain
(
data
->
chunk
,
data
->
chunk_length
,
&
(
data
->
dc
->
audioFormat
),
doReplayGain
(
data
->
chunk
,
data
->
chunk_length
,
&
(
data
->
dc
->
audioFormat
),
data
->
replayGainScale
);
data
->
replayGainScale
);
switch
(
sendDataToOutputBuffer
(
data
->
cb
,
NULL
,
data
->
dc
,
data
->
chunk
,
switch
(
sendDataToOutputBuffer
(
data
->
cb
,
NULL
,
data
->
dc
,
1
,
data
->
chunk
,
data
->
chunk_length
,
data
->
time
,
data
->
bitRate
))
data
->
chunk_length
,
data
->
time
,
data
->
bitRate
))
{
{
case
OUTPUT_BUFFER_DC_STOP
:
case
OUTPUT_BUFFER_DC_STOP
:
...
...
src/mp3_decode.c
View file @
42a1a76e
...
@@ -498,6 +498,7 @@ int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc) {
...
@@ -498,6 +498,7 @@ int mp3Read(mp3DecodeData * data, OutputBuffer * cb, DecoderControl * dc) {
ret
=
sendDataToOutputBuffer
(
cb
,
ret
=
sendDataToOutputBuffer
(
cb
,
data
->
inStream
,
data
->
inStream
,
dc
,
dc
,
data
->
inStream
->
seekable
,
data
->
outputBuffer
,
data
->
outputBuffer
,
MP3_DATA_OUTPUT_BUFFER_SIZE
,
MP3_DATA_OUTPUT_BUFFER_SIZE
,
data
->
elapsedTime
,
data
->
elapsedTime
,
...
@@ -589,7 +590,7 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream,
...
@@ -589,7 +590,7 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream,
while
(
mp3Read
(
&
data
,
cb
,
dc
)
!=
DECODE_BREAK
);
while
(
mp3Read
(
&
data
,
cb
,
dc
)
!=
DECODE_BREAK
);
/* send last little bit if not dc->stop */
/* send last little bit if not dc->stop */
if
(
data
.
outputPtr
!=
data
.
outputBuffer
&&
data
.
flush
)
{
if
(
data
.
outputPtr
!=
data
.
outputBuffer
&&
data
.
flush
)
{
if
(
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
data
.
outputBuffer
,
if
(
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
0
,
data
.
outputBuffer
,
data
.
outputPtr
-
data
.
outputBuffer
,
data
.
outputPtr
-
data
.
outputBuffer
,
data
.
elapsedTime
,
data
.
bitRate
/
1000
)
==
0
)
data
.
elapsedTime
,
data
.
bitRate
/
1000
)
==
0
)
{
{
...
...
src/mp4_decode.c
View file @
42a1a76e
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "log.h"
#include "log.h"
#include "pcm_utils.h"
#include "pcm_utils.h"
#include "inputStream.h"
#include "inputStream.h"
#include "outputBuffer.h"
#include "mp4ff/mp4ff.h"
#include "mp4ff/mp4ff.h"
...
@@ -279,7 +280,7 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
...
@@ -279,7 +280,7 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
sampleBuffer
+=
offset
*
channels
*
2
;
sampleBuffer
+=
offset
*
channels
*
2
;
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
sampleBuffer
,
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
1
,
sampleBuffer
,
sampleBufferLen
,
time
,
bitRate
);
sampleBufferLen
,
time
,
bitRate
);
if
(
dc
->
stop
)
{
if
(
dc
->
stop
)
{
eof
=
1
;
eof
=
1
;
...
...
src/ogg_decode.c
View file @
42a1a76e
...
@@ -242,15 +242,16 @@ int ogg_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
...
@@ -242,15 +242,16 @@ int ogg_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
}
}
doReplayGain
(
chunk
,
ret
,
&
(
dc
->
audioFormat
),
doReplayGain
(
chunk
,
ret
,
&
(
dc
->
audioFormat
),
replayGainScale
);
replayGainScale
);
sendDataToOutputBuffer
(
cb
,
inStream
,
dc
,
chunk
,
sendDataToOutputBuffer
(
cb
,
inStream
,
dc
,
chunkpos
,
ov_time_tell
(
&
vf
),
bitRate
);
inStream
->
seekable
,
chunk
,
chunkpos
,
ov_time_tell
(
&
vf
),
bitRate
);
if
(
dc
->
stop
)
break
;
if
(
dc
->
stop
)
break
;
chunkpos
=
0
;
chunkpos
=
0
;
}
}
}
}
if
(
!
dc
->
stop
&&
chunkpos
>
0
)
{
if
(
!
dc
->
stop
&&
chunkpos
>
0
)
{
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
chunk
,
chunkpos
,
sendDataToOutputBuffer
(
cb
,
NULL
,
dc
,
0
,
chunk
,
chunkpos
,
ov_time_tell
(
&
vf
),
bitRate
);
ov_time_tell
(
&
vf
),
bitRate
);
}
}
...
...
src/outputBuffer.c
View file @
42a1a76e
...
@@ -44,8 +44,8 @@ void flushOutputBuffer(OutputBuffer * cb) {
...
@@ -44,8 +44,8 @@ void flushOutputBuffer(OutputBuffer * cb) {
}
}
int
sendDataToOutputBuffer
(
OutputBuffer
*
cb
,
InputStream
*
inStream
,
int
sendDataToOutputBuffer
(
OutputBuffer
*
cb
,
InputStream
*
inStream
,
DecoderControl
*
dc
,
char
*
dataIn
,
long
dataInLen
,
float
time
,
DecoderControl
*
dc
,
int
seekable
,
char
*
dataIn
,
mpd_uint16
bitRate
)
long
dataInLen
,
float
time
,
mpd_uint16
bitRate
)
{
{
mpd_uint16
dataToSend
;
mpd_uint16
dataToSend
;
mpd_uint16
chunkLeft
;
mpd_uint16
chunkLeft
;
...
@@ -76,6 +76,12 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
...
@@ -76,6 +76,12 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
if
(
currentChunk
!=
cb
->
end
)
{
if
(
currentChunk
!=
cb
->
end
)
{
while
(
cb
->
begin
==
cb
->
end
&&
cb
->
wrap
&&
!
dc
->
stop
)
while
(
cb
->
begin
==
cb
->
end
&&
cb
->
wrap
&&
!
dc
->
stop
)
{
{
if
(
dc
->
seek
)
{
if
(
seekable
)
{
return
OUTPUT_BUFFER_DC_SEEK
;
}
else
dc
->
seek
=
0
;
}
if
(
!
inStream
||
if
(
!
inStream
||
bufferInputStream
(
inStream
)
<=
0
)
bufferInputStream
(
inStream
)
<=
0
)
{
{
...
...
src/outputBuffer.h
View file @
42a1a76e
...
@@ -46,8 +46,8 @@ void flushOutputBuffer(OutputBuffer * cb);
...
@@ -46,8 +46,8 @@ void flushOutputBuffer(OutputBuffer * cb);
/* we send inStream where for buffering the inputStream while waiting to
/* we send inStream where for buffering the inputStream while waiting to
send the next chunk */
send the next chunk */
int
sendDataToOutputBuffer
(
OutputBuffer
*
cb
,
InputStream
*
inStream
,
int
sendDataToOutputBuffer
(
OutputBuffer
*
cb
,
InputStream
*
inStream
,
DecoderControl
*
dc
,
char
*
data
,
long
datalen
,
float
time
,
DecoderControl
*
dc
,
int
seekable
,
char
*
data
,
long
datalen
,
mpd_uint16
bitRate
);
float
time
,
mpd_uint16
bitRate
);
#endif
#endif
/* vim:set shiftwidth=4 tabstop=8 expandtab: */
/* vim:set shiftwidth=4 tabstop=8 expandtab: */
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