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
5f219d92
Commit
5f219d92
authored
Nov 01, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some minor tweaks, and a minor memory leak plugged
git-svn-id:
https://svn.musicpd.org/mpd/trunk@2445
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
42e147a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
audioOutput_ao.c
src/audioOutput_ao.c
+1
-4
audioOutput_shout.c
src/audioOutput_shout.c
+7
-6
No files found.
src/audioOutput_ao.c
View file @
5f219d92
...
...
@@ -212,10 +212,7 @@ static int audioOutputAo_play(AudioOutput * audioOutput, char * playChunk,
int
send
;
AoData
*
ad
=
(
AoData
*
)
audioOutput
->
data
;
if
(
ad
->
device
==
NULL
)
{
ERROR
(
"trying to play w/o the ao device being open!
\n
"
);
return
-
1
;
}
if
(
ad
->
device
==
NULL
)
return
-
1
;
while
(
size
>
0
)
{
send
=
ad
->
writeSize
>
size
?
size
:
ad
->
writeSize
;
...
...
src/audioOutput_shout.c
View file @
5f219d92
...
...
@@ -61,7 +61,7 @@ typedef struct _ShoutData {
AudioFormat
inAudioFormat
;
char
*
convBuffer
;
long
convBufferLen
;
size_t
convBufferLen
;
/* shoud we convert the audio to a different format? */
int
audioFormatConvert
;
...
...
@@ -87,6 +87,7 @@ static ShoutData * newShoutData() {
static
void
freeShoutData
(
ShoutData
*
sd
)
{
if
(
sd
->
shoutConn
)
shout_free
(
sd
->
shoutConn
);
if
(
sd
->
tag
)
freeMpdTag
(
sd
->
tag
);
if
(
sd
->
convBuffer
)
free
(
sd
->
convBuffer
);
free
(
sd
);
}
...
...
@@ -113,6 +114,10 @@ static int shout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
sd
=
newShoutData
();
if
(
shoutInitCount
==
0
)
shout_init
();
shoutInitCount
++
;
checkBlockParam
(
"host"
);
host
=
blockParam
->
value
;
...
...
@@ -228,10 +233,6 @@ static int shout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
audioOutput
->
data
=
sd
;
if
(
shoutInitCount
==
0
)
shout_init
();
shoutInitCount
++
;
return
0
;
}
...
...
@@ -423,7 +424,7 @@ static int shout_openDevice(AudioOutput * audioOutput,
static
void
shout_convertAudioFormat
(
ShoutData
*
sd
,
char
**
chunkArgPtr
,
int
*
sizeArgPtr
)
{
in
t
size
=
pcm_sizeOfOutputBufferForAudioFormatConversion
(
size_
t
size
=
pcm_sizeOfOutputBufferForAudioFormatConversion
(
&
(
sd
->
inAudioFormat
),
*
sizeArgPtr
,
&
(
sd
->
outAudioFormat
));
...
...
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