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
f9316fbb
Commit
f9316fbb
authored
Sep 09, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output: renamed the functions in output_control.c
Getting rid of CamcelCase, again.
parent
e2c916e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
34 deletions
+34
-34
audio.c
src/audio.c
+12
-12
output_control.c
src/output_control.c
+11
-11
output_control.h
src/output_control.h
+10
-10
output_init.c
src/output_init.c
+1
-1
No files found.
src/audio.c
View file @
f9316fbb
...
...
@@ -103,7 +103,7 @@ void initAudioDriver(void)
/* only allow param to be NULL if there just one audioOutput */
assert
(
param
||
(
audioOutputArraySize
==
1
));
if
(
!
initAudioOutpu
t
(
output
,
param
))
{
if
(
!
audio_output_ini
t
(
output
,
param
))
{
if
(
param
)
{
FATAL
(
"problems configuring output device "
...
...
@@ -229,7 +229,7 @@ void finishAudioDriver(void)
unsigned
int
i
;
for
(
i
=
0
;
i
<
audioOutputArraySize
;
i
++
)
{
finishAudioOutput
(
&
audioOutputArray
[
i
]);
audio_output_finish
(
&
audioOutputArray
[
i
]);
}
free
(
audioOutputArray
);
...
...
@@ -263,16 +263,16 @@ static void syncAudioDeviceStates(void)
break
;
case
DEVICE_ON
:
/* This will reopen only if the audio format changed */
if
(
openAudioOutput
(
audioOutput
,
&
audio_format
)
<
0
)
if
(
audio_output_open
(
audioOutput
,
&
audio_format
)
<
0
)
audioDeviceStates
[
i
]
=
DEVICE_ENABLE
;
break
;
case
DEVICE_ENABLE
:
if
(
openAudioOutput
(
audioOutput
,
&
audio_format
)
==
0
)
if
(
audio_output_open
(
audioOutput
,
&
audio_format
)
==
0
)
audioDeviceStates
[
i
]
=
DEVICE_ON
;
break
;
case
DEVICE_DISABLE
:
dropBufferedAudioOutput
(
audioOutput
);
closeAudioOutput
(
audioOutput
);
audio_output_cancel
(
audioOutput
);
audio_output_close
(
audioOutput
);
audioDeviceStates
[
i
]
=
DEVICE_OFF
;
}
}
...
...
@@ -291,8 +291,8 @@ static int flushAudioBuffer(void)
for
(
i
=
0
;
i
<
audioOutputArraySize
;
++
i
)
{
if
(
audioDeviceStates
[
i
]
!=
DEVICE_ON
)
continue
;
err
=
playAudioOutput
(
&
audioOutputArray
[
i
],
audioBuffer
,
audioBufferPos
);
err
=
audio_output_play
(
&
audioOutputArray
[
i
],
audioBuffer
,
audioBufferPos
);
if
(
!
err
)
ret
=
0
;
else
if
(
err
<
0
)
...
...
@@ -335,7 +335,7 @@ int openAudioDevice(const struct audio_format *audioFormat)
else
{
/* close all devices if there was an error */
for
(
i
=
0
;
i
<
audioOutputArraySize
;
++
i
)
{
closeAudioOutput
(
&
audioOutputArray
[
i
]);
audio_output_close
(
&
audioOutputArray
[
i
]);
}
audioOpened
=
0
;
...
...
@@ -380,7 +380,7 @@ void dropBufferedAudio(void)
for
(
i
=
0
;
i
<
audioOutputArraySize
;
++
i
)
{
if
(
audioDeviceStates
[
i
]
==
DEVICE_ON
)
dropBufferedAudioOutput
(
&
audioOutputArray
[
i
]);
audio_output_cancel
(
&
audioOutputArray
[
i
]);
}
}
...
...
@@ -397,7 +397,7 @@ void closeAudioDevice(void)
for
(
i
=
0
;
i
<
audioOutputArraySize
;
++
i
)
{
if
(
audioDeviceStates
[
i
]
==
DEVICE_ON
)
audioDeviceStates
[
i
]
=
DEVICE_ENABLE
;
closeAudioOutput
(
&
audioOutputArray
[
i
]);
audio_output_close
(
&
audioOutputArray
[
i
]);
}
audioOpened
=
0
;
...
...
@@ -408,7 +408,7 @@ void sendMetadataToAudioDevice(const struct tag *tag)
unsigned
int
i
;
for
(
i
=
0
;
i
<
audioOutputArraySize
;
++
i
)
{
sendMetadataToAudioOutput
(
&
audioOutputArray
[
i
],
tag
);
audio_output_send_tag
(
&
audioOutputArray
[
i
],
tag
);
}
}
...
...
src/output_control.c
View file @
f9316fbb
...
...
@@ -22,8 +22,8 @@
#include "utils.h"
#include "audio.h"
int
openAudioOutput
(
struct
audio_output
*
audioOutput
,
const
struct
audio_format
*
audioFormat
)
int
audio_output_open
(
struct
audio_output
*
audioOutput
,
const
struct
audio_format
*
audioFormat
)
{
int
ret
=
0
;
...
...
@@ -41,7 +41,7 @@ int openAudioOutput(struct audio_output *audioOutput,
copyAudioFormat
(
&
audioOutput
->
outAudioFormat
,
&
audioOutput
->
inAudioFormat
);
if
(
audioOutput
->
open
)
closeAudioOutput
(
audioOutput
);
audio_output_close
(
audioOutput
);
}
if
(
!
audioOutput
->
open
)
...
...
@@ -77,8 +77,8 @@ static void convertAudioFormat(struct audio_output *audioOutput,
*
chunkArgPtr
=
audioOutput
->
convBuffer
;
}
int
playAudioOutput
(
struct
audio_output
*
audioOutput
,
const
char
*
playChunk
,
size_t
size
)
int
audio_output_play
(
struct
audio_output
*
audioOutput
,
const
char
*
playChunk
,
size_t
size
)
{
int
ret
;
...
...
@@ -94,29 +94,29 @@ int playAudioOutput(struct audio_output *audioOutput,
return
ret
;
}
void
dropBufferedAudioOutput
(
struct
audio_output
*
audioOutput
)
void
audio_output_cancel
(
struct
audio_output
*
audioOutput
)
{
if
(
audioOutput
->
open
)
audioOutput
->
plugin
->
cancel
(
audioOutput
);
}
void
closeAudioOutput
(
struct
audio_output
*
audioOutput
)
void
audio_output_close
(
struct
audio_output
*
audioOutput
)
{
if
(
audioOutput
->
open
)
audioOutput
->
plugin
->
close
(
audioOutput
);
}
void
finishAudioOutput
(
struct
audio_output
*
audioOutput
)
void
audio_output_finish
(
struct
audio_output
*
audioOutput
)
{
closeAudioOutput
(
audioOutput
);
audio_output_close
(
audioOutput
);
if
(
audioOutput
->
plugin
->
finish
)
audioOutput
->
plugin
->
finish
(
audioOutput
);
if
(
audioOutput
->
convBuffer
)
free
(
audioOutput
->
convBuffer
);
}
void
sendMetadataToAudioOutput
(
struct
audio_output
*
audioOutput
,
const
struct
tag
*
tag
)
void
audio_output_send_tag
(
struct
audio_output
*
audioOutput
,
const
struct
tag
*
tag
)
{
if
(
audioOutput
->
plugin
->
send_tag
)
audioOutput
->
plugin
->
send_tag
(
audioOutput
,
tag
);
...
...
src/output_control.h
View file @
f9316fbb
...
...
@@ -27,15 +27,15 @@ struct audio_output_plugin;
struct
audio_format
;
struct
tag
;
int
initAudioOutpu
t
(
struct
audio_output
*
,
ConfigParam
*
param
);
int
openAudioOutput
(
struct
audio_output
*
audioOutput
,
const
struct
audio_format
*
audioFormat
);
int
playAudioOutput
(
struct
audio_output
*
audioOutput
,
const
char
*
playChunk
,
size_t
size
);
void
dropBufferedAudioOutput
(
struct
audio_output
*
audioOutput
);
void
closeAudioOutput
(
struct
audio_output
*
audioOutput
);
void
finishAudioOutput
(
struct
audio_output
*
audioOutput
);
void
sendMetadataToAudioOutput
(
struct
audio_output
*
audioOutput
,
const
struct
tag
*
tag
);
int
audio_output_ini
t
(
struct
audio_output
*
,
ConfigParam
*
param
);
int
audio_output_open
(
struct
audio_output
*
audioOutput
,
const
struct
audio_format
*
audioFormat
);
int
audio_output_play
(
struct
audio_output
*
audioOutput
,
const
char
*
playChunk
,
size_t
size
);
void
audio_output_cancel
(
struct
audio_output
*
audioOutput
);
void
audio_output_close
(
struct
audio_output
*
audioOutput
);
void
audio_output_finish
(
struct
audio_output
*
audioOutput
);
void
audio_output_send_tag
(
struct
audio_output
*
audioOutput
,
const
struct
tag
*
tag
);
#endif
src/output_init.c
View file @
f9316fbb
...
...
@@ -36,7 +36,7 @@
if(bp) str = bp->value; \
}
int
initAudioOutpu
t
(
struct
audio_output
*
ao
,
ConfigParam
*
param
)
int
audio_output_ini
t
(
struct
audio_output
*
ao
,
ConfigParam
*
param
)
{
const
char
*
name
=
NULL
;
char
*
format
=
NULL
;
...
...
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