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
c180d2f9
Commit
c180d2f9
authored
May 19, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to make seeking more non-blocking
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1076
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
bf9e2afb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6 additions
and
11 deletions
+6
-11
aac_decode.c
src/aac_decode.c
+2
-3
audiofile_decode.c
src/audiofile_decode.c
+0
-1
decode.c
src/decode.c
+0
-0
decode.h
src/decode.h
+2
-1
flac_decode.c
src/flac_decode.c
+0
-1
mp3_decode.c
src/mp3_decode.c
+0
-1
mp4_decode.c
src/mp4_decode.c
+2
-3
ogg_decode.c
src/ogg_decode.c
+0
-1
No files found.
src/aac_decode.c
View file @
c180d2f9
...
...
@@ -341,13 +341,12 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) {
sampleRate
=
frameInfo
.
samplerate
;
#endif
if
(
dc
->
sta
rt
)
{
if
(
dc
->
sta
te
!=
DECODE_STATE_DECODE
)
{
dc
->
audioFormat
.
channels
=
frameInfo
.
channels
;
dc
->
audioFormat
.
sampleRate
=
sampleRate
;
getOutputAudioFormat
(
&
(
dc
->
audioFormat
),
&
(
cb
->
audioFormat
));
dc
->
state
=
DECODE_STATE_DECODE
;
dc
->
start
=
0
;
}
advanceAacBuffer
(
&
b
,
frameInfo
.
bytesconsumed
);
...
...
@@ -382,7 +381,7 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) {
closeInputStream
(
b
.
inStream
);
if
(
b
.
buffer
)
free
(
b
.
buffer
);
if
(
dc
->
sta
rt
)
return
-
1
;
if
(
dc
->
sta
te
!=
DECODE_STATE_DECODE
)
return
-
1
;
if
(
!
dc
->
stop
&&
!
dc
->
seek
&&
chunkLen
>
0
)
{
cb
->
chunkSize
[
cb
->
end
]
=
chunkLen
;
...
...
src/audiofile_decode.c
View file @
c180d2f9
...
...
@@ -91,7 +91,6 @@ int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) {
fs
=
(
int
)
afGetFrameSize
(
af_fp
,
AF_DEFAULT_TRACK
,
1
);
dc
->
state
=
DECODE_STATE_DECODE
;
dc
->
start
=
0
;
{
int
ret
,
eof
=
0
,
current
=
0
;
unsigned
char
chunk
[
CHUNK_SIZE
];
...
...
src/decode.c
View file @
c180d2f9
This diff is collapsed.
Click to expand it.
src/decode.h
View file @
c180d2f9
...
...
@@ -31,7 +31,8 @@
#define DECODE_TYPE_URL 1
#define DECODE_STATE_STOP 0
#define DECODE_STATE_DECODE 1
#define DECODE_STATE_START 1
#define DECODE_STATE_DECODE 2
#define DECODE_ERROR_NOERROR 0
#define DECODE_ERROR_UNKTYPE 10
...
...
src/flac_decode.c
View file @
c180d2f9
...
...
@@ -135,7 +135,6 @@ int flac_decode(OutputBuffer * cb, DecoderControl *dc) {
}
dc
->
state
=
DECODE_STATE_DECODE
;
dc
->
start
=
0
;
while
(
1
)
{
FLAC__seekable_stream_decoder_process_single
(
flacDec
);
...
...
src/mp3_decode.c
View file @
c180d2f9
...
...
@@ -560,7 +560,6 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) {
getOutputAudioFormat
(
&
(
dc
->
audioFormat
),
&
(
cb
->
audioFormat
));
dc
->
totalTime
=
data
.
totalTime
;
dc
->
start
=
0
;
dc
->
state
=
DECODE_STATE_DECODE
;
while
(
mp3Read
(
&
data
,
cb
,
dc
)
!=
DECODE_BREAK
);
...
...
src/mp4_decode.c
View file @
c180d2f9
...
...
@@ -249,7 +249,7 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
break
;
}
if
(
dc
->
sta
rt
)
{
if
(
dc
->
sta
te
!=
DECODE_STATE_DECODE
)
{
channels
=
frameInfo
.
channels
;
#ifdef HAVE_FAACDECFRAMEINFO_SAMPLERATE
scale
=
frameInfo
.
samplerate
;
...
...
@@ -259,7 +259,6 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
getOutputAudioFormat
(
&
(
dc
->
audioFormat
),
&
(
cb
->
audioFormat
));
dc
->
state
=
DECODE_STATE_DECODE
;
dc
->
start
=
0
;
}
if
(
channels
*
(
dur
+
offset
)
>
frameInfo
.
samples
)
{
...
...
@@ -297,7 +296,7 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
closeInputStream
(
&
inStream
);
free
(
mp4cb
);
if
(
dc
->
sta
rt
)
return
-
1
;
if
(
dc
->
sta
te
!=
DECODE_STATE_DECODE
)
return
-
1
;
if
(
!
dc
->
stop
&&
!
dc
->
seek
&&
chunkLen
>
0
)
{
cb
->
chunkSize
[
cb
->
end
]
=
chunkLen
;
...
...
src/ogg_decode.c
View file @
c180d2f9
...
...
@@ -175,7 +175,6 @@ int ogg_decode(OutputBuffer * cb, DecoderControl * dc)
dc
->
totalTime
=
ov_time_total
(
&
vf
,
-
1
);
dc
->
state
=
DECODE_STATE_DECODE
;
dc
->
start
=
0
;
{
int
current_section
;
...
...
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