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
d05c3b51
Commit
d05c3b51
authored
Oct 10, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add audioOutput.c
git-svn-id:
https://svn.musicpd.org/mpd/trunk@2205
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
de48cf67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
audioOutput.c
src/audioOutput.c
+43
-0
audioOutput.h
src/audioOutput.h
+6
-0
utf8.h
src/utf8.h
+0
-1
No files found.
src/audioOutput.c
0 → 100644
View file @
d05c3b51
#include <audioOutput.h>
#include <list.h>
static
List
*
audioOutputPluginList
;
void
loadAudioOutputPlugin
(
AudioOutputPlugin
*
audioOutputPlugin
)
{
insertInList
(
audioOutputPluginList
,
audioOutputPlugin
->
name
,
audioOutputPlugin
);
}
void
unloadAudioOutputPlugin
(
AudioOutputPlugin
*
audioOutputPlugin
)
{
deleteFromList
(
audioOutputPluginList
,
audioOutputPlugin
->
name
);
}
void
initAudioOutputPlugins
()
{
audioOutputPluginList
=
makeList
(
NULL
);
}
void
finishAudioOutputPlugins
()
{
freeList
(
audioOutputPluginList
);
}
AudioOutput
*
newAudioOutput
(
char
*
name
)
{
AudioOutput
*
ret
=
NULL
;
void
*
data
=
NULL
;
if
(
findInList
(
audioOutputPluginList
,
name
,
&
data
))
{
AudioOutputPlugin
*
plugin
=
(
AudioOutputPlugin
*
)
data
;
ret
=
malloc
(
sizeof
(
AudioOutput
));
ret
->
initConfigFunc
=
plugin
->
initConfigFunc
;
ret
->
finishConfigFunc
=
plugin
->
finishConfigFunc
;
ret
->
initDriverFunc
=
plugin
->
initDriverFunc
;
ret
->
finishDriverFunc
=
plugin
->
initDriverFunc
;
ret
->
openDeviceFunc
=
plugin
->
openDeviceFunc
;
ret
->
playFunc
=
plugin
->
playFunc
;
ret
->
closeDeviceFunc
=
plugin
->
closeDeviceFunc
;
}
return
ret
;
}
void
closeAudioOutput
(
AudioOutput
*
audioOutput
);
src/audioOutput.h
View file @
d05c3b51
...
...
@@ -69,4 +69,10 @@ typedef struct _AudioOutputPlugin {
AudioOutputCloseDevicFunc
closeDeviceFunc
;
}
AudioOutputPlugin
;
void
loadAudioOutputPlugin
(
AudioOutputPlugin
*
audioOutputPlugin
);
void
unloadAudioOutputPlugin
(
AudioOutputPlugin
*
audioOutputPlugin
);
AudioOutput
*
newAudioOutput
(
char
*
name
);
void
closeAudioOutput
(
AudioOutput
*
audioOutput
);
#endif
src/utf8.h
View file @
d05c3b51
...
...
@@ -26,4 +26,3 @@ unsigned char * utf8StrToLatin1Dup(unsigned char * utf8);
int
validUtf8String
(
unsigned
char
*
string
);
#endif
/* vim:set shiftwidth=4 tabstop=8 expandtab: */
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