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
023fba80
Commit
023fba80
authored
Nov 01, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
something
git-svn-id:
https://svn.musicpd.org/mpd/trunk@2453
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
eefe9df3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
24 deletions
+14
-24
audioOutput_shout.c
src/audioOutput_shout.c
+14
-24
No files found.
src/audioOutput_shout.c
View file @
023fba80
...
...
@@ -255,23 +255,20 @@ static void flushEncoder(ShoutData * sd) {
}*/
static
void
clearEncoder
(
ShoutData
*
sd
)
{
/*finishEncoder(sd);
*/
/*
flushEncoder(sd);*/
ogg_stream_clear
(
&
(
sd
->
os
)
);
vorbis_block_clear
(
&
(
sd
->
vb
)
);
vorbis_
dsp_clear
(
&
(
sd
->
vd
)
);
vorbis_
comment_clear
(
&
(
sd
->
vc
)
);
vorbis_info_clear
(
&
(
sd
->
vi
)
);
/*finishEncoder(sd);
flushEncoder(sd);*/
vorbis_comment_clear
(
&
sd
->
vc
);
ogg_stream_clear
(
&
sd
->
os
);
vorbis_
block_clear
(
&
sd
->
vb
);
vorbis_
dsp_clear
(
&
sd
->
vd
);
vorbis_info_clear
(
&
sd
->
vi
);
}
static
void
shout_closeShoutConn
(
ShoutData
*
sd
)
{
DEBUG
(
"closeShoutConn called
\n
"
);
if
(
sd
->
opened
)
{
clearEncoder
(
sd
);
shout_sync
(
sd
->
shoutConn
);
if
(
shout_close
(
sd
->
shoutConn
)
!=
SHOUTERR_SUCCESS
)
{
ERROR
(
"problem closing connection to shout server: "
"%s
\n
"
,
shout_get_error
(
sd
->
shoutConn
));
...
...
@@ -294,10 +291,6 @@ static void shout_finishDriver(AudioOutput * audioOutput) {
}
static
void
shout_closeDevice
(
AudioOutput
*
audioOutput
)
{
ShoutData
*
sd
=
(
ShoutData
*
)
audioOutput
->
data
;
if
(
sd
->
opened
)
shout_sync
(
sd
->
shoutConn
);
audioOutput
->
open
=
0
;
}
...
...
@@ -388,8 +381,6 @@ static int initEncoder(ShoutData * sd) {
static
int
shout_openShoutConn
(
AudioOutput
*
audioOutput
)
{
ShoutData
*
sd
=
(
ShoutData
*
)
audioOutput
->
data
;
DEBUG
(
"openShoutConn called
\n
"
);
if
(
shout_open
(
sd
->
shoutConn
)
!=
SHOUTERR_SUCCESS
)
{
ERROR
(
"problem opening connection to shout server: %s
\n
"
,
...
...
@@ -455,7 +446,7 @@ static int shout_openDevice(AudioOutput * audioOutput,
static
void
shout_convertAudioFormat
(
ShoutData
*
sd
,
char
**
chunkArgPtr
,
int
*
sizeArgPtr
)
{
size_
t
size
=
pcm_sizeOfOutputBufferForAudioFormatConversion
(
in
t
size
=
pcm_sizeOfOutputBufferForAudioFormatConversion
(
&
(
sd
->
inAudioFormat
),
*
sizeArgPtr
,
&
(
sd
->
outAudioFormat
));
...
...
@@ -540,15 +531,14 @@ static int shout_play(AudioOutput * audioOutput, char * playChunk, int size) {
while
(
vorbis_bitrate_flushpacket
(
&
(
sd
->
vd
),
&
(
sd
->
op
)))
{
ogg_stream_packetin
(
&
(
sd
->
os
),
&
(
sd
->
op
));
do
{
if
(
ogg_stream_pageout
(
&
(
sd
->
os
),
&
(
sd
->
og
))
==
0
)
{
break
;
}
if
(
write_page
(
sd
)
<
0
)
return
-
1
;
}
while
(
ogg_page_eos
(
&
(
sd
->
og
)));
}
}
while
(
ogg_stream_pageout
(
&
(
sd
->
os
),
&
(
sd
->
og
))
!=
0
)
{
if
(
write_page
(
sd
)
<
0
)
return
-
1
;
}
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