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
c1cd2668
Commit
c1cd2668
authored
May 19, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixy poo s/1/0/
and mark in decoderControl if we are seekable git-svn-id:
https://svn.musicpd.org/mpd/trunk@1078
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
ec3a9b66
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
decode.c
src/decode.c
+2
-2
decode.h
src/decode.h
+1
-0
mp3_decode.c
src/mp3_decode.c
+1
-1
No files found.
src/decode.c
View file @
c1cd2668
...
...
@@ -114,7 +114,7 @@ int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af) {
#define handleDecodeStart() \
if(decodeWaitedOn && dc->state==DECODE_STATE_DECODE) { \
decodeWaitedOn =
1
; \
decodeWaitedOn =
0
; \
if(openAudioDevice(&(cb->audioFormat))<0) { \
strncpy(pc->erroredFile,pc->file,MAXPATHLEN); \
pc->erroredFile[MAXPATHLEN] = '\0'; \
...
...
@@ -127,7 +127,7 @@ int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af) {
pc->bits = dc->audioFormat.bits; \
pc->channels = dc->audioFormat.channels; \
} \
else { \
else
if(decodeWaitedOn)
{ \
my_usleep(10); \
continue; \
}
...
...
src/decode.h
View file @
c1cd2668
...
...
@@ -46,6 +46,7 @@
#define DECODE_SUFFIX_WAVE 6
typedef
struct
_DecoderControl
{
volatile
mpd_sint8
seekable
;
volatile
mpd_sint8
state
;
volatile
mpd_sint8
stop
;
volatile
mpd_sint8
start
;
...
...
src/mp3_decode.c
View file @
c1cd2668
...
...
@@ -189,7 +189,7 @@ int fillMp3InputBuffer(mp3DecodeData * data) {
readSize
);
if
(
readed
<=
0
&&
inputStreamAtEOF
(
data
->
inStream
))
return
-
1
;
/* sleep for a fraction of a second! */
else
if
(
readed
==
0
)
my_usleep
(
1
0
);
else
if
(
readed
<=
0
)
my_usleep
(
1000
0
);
mad_stream_buffer
(
&
data
->
stream
,
data
->
readBuffer
,
readed
+
remaining
);
(
data
->
stream
).
error
=
0
;
...
...
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