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
eb5d51c9
Commit
eb5d51c9
authored
Apr 12, 2008
by
Max Kellermann
Committed by
Eric Wong
Apr 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed another shadow warning
git-svn-id:
https://svn.musicpd.org/mpd/trunk@7307
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
70ba5251
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
audioOutput_ao.c
src/audioOutputs/audioOutput_ao.c
+11
-11
No files found.
src/audioOutputs/audioOutput_ao.c
View file @
eb5d51c9
...
...
@@ -59,7 +59,7 @@ static int audioOutputAo_initDriver(AudioOutput * audioOutput,
ConfigParam
*
param
)
{
ao_info
*
ai
;
char
*
dup
;
char
*
dup
licated
;
char
*
stk1
;
char
*
stk2
;
char
*
n1
;
...
...
@@ -105,13 +105,13 @@ static int audioOutputAo_initDriver(AudioOutput * audioOutput,
blockParam
=
getBlockParam
(
param
,
"options"
);
if
(
blockParam
)
{
dup
=
xstrdup
(
blockParam
->
value
);
dup
licated
=
xstrdup
(
blockParam
->
value
);
}
else
dup
=
xstrdup
(
""
);
dup
licated
=
xstrdup
(
""
);
if
(
strlen
(
dup
))
{
if
(
strlen
(
dup
licated
))
{
stk1
=
NULL
;
n1
=
strtok_r
(
dup
,
";"
,
&
stk1
);
n1
=
strtok_r
(
dup
licated
,
";"
,
&
stk1
);
while
(
n1
)
{
stk2
=
NULL
;
key
=
strtok_r
(
n1
,
"="
,
&
stk2
);
...
...
@@ -136,7 +136,7 @@ static int audioOutputAo_initDriver(AudioOutput * audioOutput,
n1
=
strtok_r
(
NULL
,
";"
,
&
stk1
);
}
}
free
(
dup
);
free
(
dup
licated
);
return
0
;
}
...
...
@@ -219,25 +219,25 @@ static int ao_play_deconst(ao_device *device, const void *output_samples,
static
int
audioOutputAo_play
(
AudioOutput
*
audioOutput
,
const
char
*
playChunk
,
size_t
size
)
{
size_t
send
;
size_t
chunk_size
;
AoData
*
ad
=
(
AoData
*
)
audioOutput
->
data
;
if
(
ad
->
device
==
NULL
)
return
-
1
;
while
(
size
>
0
)
{
send
=
(
size_t
)
ad
->
writeSize
>
size
chunk_size
=
(
size_t
)
ad
->
writeSize
>
size
?
size
:
(
size_t
)
ad
->
writeSize
;
if
(
ao_play_deconst
(
ad
->
device
,
playChunk
,
send
)
==
0
)
{
if
(
ao_play_deconst
(
ad
->
device
,
playChunk
,
chunk_size
)
==
0
)
{
audioOutputAo_error
();
ERROR
(
"closing audio device due to write error
\n
"
);
audioOutputAo_closeDevice
(
audioOutput
);
return
-
1
;
}
playChunk
+=
send
;
size
-=
send
;
playChunk
+=
chunk_size
;
size
-=
chunk_size
;
}
return
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