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
6eb6c454
Commit
6eb6c454
authored
Jun 20, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix qball's bug, crossfading playing with funny samplerate
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1585
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
d8dbd29c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
1 deletion
+65
-1
decode.c
src/decode.c
+3
-1
inputStream.c
src/inputStream.c
+5
-0
inputStream_file.c
src/inputStream_file.c
+3
-0
inputStream_file.h
src/inputStream_file.h
+2
-0
inputStream_http.c
src/inputStream_http.c
+50
-0
inputStream_http.h
src/inputStream_http.h
+2
-0
No files found.
src/decode.c
View file @
6eb6c454
...
...
@@ -486,7 +486,9 @@ void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb) {
pc
->
queueState
=
PLAYER_QUEUE_DECODE
;
kill
(
getppid
(),
SIGUSR1
);
}
if
(
next
>=
0
&&
doCrossFade
==
0
&&
!
dc
->
start
)
{
if
(
next
>=
0
&&
doCrossFade
==
0
&&
!
dc
->
start
&&
dc
->
state
!=
DECODE_STATE_START
)
{
nextChunk
=
-
1
;
if
(
isCurrentAudioFormat
(
&
(
cb
->
audioFormat
)))
{
doCrossFade
=
1
;
...
...
src/inputStream.c
View file @
6eb6c454
...
...
@@ -25,6 +25,11 @@
#include <sys/types.h>
#include <unistd.h>
void
initInputStream
()
{
inputStream_initFile
();
inputStream_initHttp
();
}
int
openInputStream
(
InputStream
*
inStream
,
char
*
url
)
{
inStream
->
offset
=
0
;
inStream
->
size
=
0
;
...
...
src/inputStream_file.c
View file @
6eb6c454
...
...
@@ -23,6 +23,9 @@
#include <unistd.h>
#include <errno.h>
void
inputStream_initFile
()
{
}
int
inputStream_fileOpen
(
InputStream
*
inStream
,
char
*
filename
)
{
FILE
*
fp
;
...
...
src/inputStream_file.h
View file @
6eb6c454
...
...
@@ -21,6 +21,8 @@
#include "inputStream.h"
void
inputStream_initFile
();
int
inputStream_fileOpen
(
InputStream
*
inStream
,
char
*
filename
);
int
inputStream_fileSeek
(
InputStream
*
inStream
,
long
offset
,
int
whence
);
...
...
src/inputStream_http.c
View file @
6eb6c454
...
...
@@ -20,6 +20,7 @@
#include "utils.h"
#include "log.h"
#include "conf.h"
#include <stdio.h>
#include <sys/time.h>
...
...
@@ -61,6 +62,55 @@ typedef struct _InputStreemHTTPData {
int
icyOffset
;
}
InputStreamHTTPData
;
void
inputStream_initHttp
()
{
if
(
getConf
()[
CONF_HTTP_PROXY_HOST
])
{
char
*
portStr
=
getConf
()[
CONF_HTTP_PROXY_PORT
];
int
port
=
0
;
char
*
test
;
if
(
!
portStr
)
{
ERROR
(
"http_proxy_host specified but not the http_"
"proxy_port
\n
"
);
exit
(
EXIT_FAILURE
);
}
port
=
strtol
(
portStr
,
&
test
,
10
);
if
(
port
<=
0
||
*
test
!=
'\0'
)
{
ERROR
(
"http_proxy_port
\"
%s
\"
is not a positive integer"
"
\n
"
,
portStr
);
}
if
(
getConf
()[
CONF_HTTP_PROXY_USER
]
&&
!
getConf
()[
CONF_HTTP_PROXY_PASSWORD
])
{
ERROR
(
"http_proxy_user specified, but not http_proxy_"
"password
\n
"
);
exit
(
EXIT_FAILURE
);
}
if
(
getConf
()[
CONF_HTTP_PROXY_PASSWORD
]
&&
!
getConf
()[
CONF_HTTP_PROXY_USER
])
{
ERROR
(
"http proxy password specified, but not http "
"proxy user
\n
"
);
exit
(
EXIT_FAILURE
);
}
}
else
if
(
getConf
()[
CONF_HTTP_PROXY_PORT
])
{
ERROR
(
"http_proxy_port specified but not http_proxy_host
\n
"
);
exit
(
EXIT_FAILURE
);
}
else
if
(
getConf
()[
CONF_HTTP_PROXY_USER
])
{
ERROR
(
"http_proxy_user specified but not http_proxy_host
\n
"
);
exit
(
EXIT_FAILURE
);
}
else
if
(
getConf
()[
CONF_HTTP_PROXY_PASSWORD
])
{
ERROR
(
"http_proxy_password specified but not http_proxy_host"
"
\n
"
);
exit
(
EXIT_FAILURE
);
}
}
static
InputStreamHTTPData
*
newInputStreamHTTPData
()
{
InputStreamHTTPData
*
ret
=
malloc
(
sizeof
(
InputStreamHTTPData
));
...
...
src/inputStream_http.h
View file @
6eb6c454
...
...
@@ -21,6 +21,8 @@
#include "inputStream.h"
void
inputStream_initHttp
();
int
inputStream_httpOpen
(
InputStream
*
inStream
,
char
*
filename
);
int
inputStream_httpSeek
(
InputStream
*
inStream
,
long
offset
,
int
whence
);
...
...
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