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
8810eafb
Commit
8810eafb
authored
Sep 02, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add configuration variables for shout stuff
git-svn-id:
https://svn.musicpd.org/mpd/trunk@2099
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
df50ddf5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
10 deletions
+35
-10
conf.c
src/conf.c
+9
-2
conf.h
src/conf.h
+7
-0
mod_plugin.c
src/inputPlugins/mod_plugin.c
+19
-8
No files found.
src/conf.c
View file @
8810eafb
...
...
@@ -37,7 +37,7 @@
#define CONF_COMMENT '#'
#define CONF_NUMBER_OF_PARAMS
34
#define CONF_NUMBER_OF_PARAMS
41
#define CONF_NUMBER_OF_PATHS 6
#define CONF_NUMBER_OF_REQUIRED 5
#define CONF_NUMBER_OF_ALLOW_CATS 1
...
...
@@ -130,7 +130,14 @@ char ** readConf(char * file) {
"http_proxy_port"
,
"http_proxy_user"
,
"http_proxy_password"
,
"replaygain_preamp"
"replaygain_preamp"
,
"shout_host"
,
"shout_port"
,
"shout_password"
,
"shout_mount"
,
"shout_name"
,
"shout_user"
,
"shout_quality"
};
int
conf_absolutePaths
[
CONF_NUMBER_OF_PATHS
]
=
{
...
...
src/conf.h
View file @
8810eafb
...
...
@@ -55,6 +55,13 @@
#define CONF_HTTP_PROXY_USER 31
#define CONF_HTTP_PROXY_PASSWORD 32
#define CONF_REPLAYGAIN_PREAMP 33
#define CONF_SHOUT_HOST 34
#define CONF_SHOUT_PORT 35
#define CONF_SHOUT_PASSWD 36
#define CONF_SHOUT_MOUNT 37
#define CONF_SHOUT_NAME 38
#define CONF_SHOUT_USER 39
#define CONF_SHOUT_QUALITY 40
#define CONF_CAT_CHAR "\n"
...
...
src/inputPlugins/mod_plugin.c
View file @
8810eafb
...
...
@@ -95,16 +95,21 @@ static int mod_mikModInitiated = 0;
static
int
mod_mikModInitError
=
0
;
static
int
mod_initMikMod
()
{
if
(
mod_mikModInitiated
)
return
0
;
if
(
mod_mikModInitError
)
return
-
1
;
mod_mikModInitiated
=
1
;
if
(
!
mod_mikModInitiated
)
{
mod_mikModInitiated
=
1
;
MikMod_RegisterDriver
(
&
drv_mpd
)
;
MikMod_RegisterAllLoaders
()
;
md_device
=
0
;
md_reverb
=
0
;
md_reverb
=
0
;
md_mode
=
(
DMODE_SOFT_MUSIC
|
DMODE_SOFT_SNDFX
|
DMODE_STEREO
|
MikMod_RegisterDriver
(
&
drv_mpd
);
MikMod_RegisterAllLoaders
();
}
md_pansep
=
64
;
md_mixfreq
=
44100
;
md_mode
=
(
DMODE_SOFT_MUSIC
|
DMODE_INTERP
|
DMODE_STEREO
|
DMODE_16BITS
);
if
(
MikMod_Init
(
""
))
{
...
...
@@ -130,7 +135,7 @@ static mod_Data * mod_open(char * path) {
MODULE
*
moduleHandle
;
mod_Data
*
data
;
if
(
!
(
moduleHandle
=
Player_Load
(
path
,
255
,
0
)))
return
NULL
;
if
(
!
(
moduleHandle
=
Player_Load
(
path
,
128
,
0
)))
return
NULL
;
data
=
malloc
(
sizeof
(
mod_Data
));
...
...
@@ -159,6 +164,7 @@ int mod_decode(OutputBuffer * cb, DecoderControl * dc, char * path) {
if
(
!
(
data
=
mod_open
(
path
)))
{
ERROR
(
"failed to open mod: %s
\n
"
,
path
);
MikMod_Exit
();
return
-
1
;
}
...
...
@@ -192,6 +198,8 @@ int mod_decode(OutputBuffer * cb, DecoderControl * dc, char * path) {
mod_close
(
data
);
MikMod_Exit
();
if
(
dc
->
stop
)
{
dc
->
state
=
DECODE_STATE_STOP
;
dc
->
stop
=
0
;
...
...
@@ -207,7 +215,7 @@ MpdTag * modTagDup(char * file) {
if
(
mod_initMikMod
()
<
0
)
return
NULL
;
if
(
!
(
moduleHandle
=
Player_Load
(
file
,
255
,
0
)))
return
NULL
;
if
(
!
(
moduleHandle
=
Player_Load
(
file
,
128
,
0
)))
goto
fail
;
Player_Free
(
moduleHandle
);
...
...
@@ -216,6 +224,9 @@ MpdTag * modTagDup(char * file) {
ret
->
time
=
0
;
ret
->
title
=
Player_LoadTitle
(
file
);
fail:
MikMod_Exit
();
return
ret
;
}
...
...
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