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
92f1bb82
Commit
92f1bb82
authored
Mar 13, 2005
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some broken OS X stuff
git-svn-id:
https://svn.musicpd.org/mpd/trunk@3075
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
89367896
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
configure.ac
configure.ac
+1
-0
audioOutput_osx.c
src/audioOutputs/audioOutput_osx.c
+19
-1
No files found.
configure.ac
View file @
92f1bb82
...
...
@@ -106,6 +106,7 @@ enable_osx=no
case $host in
*-darwin*)
AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
MPD_LIBS="$MPD_LIBS -framework CoreAudio"
enable_osx=yes ;;
esac
...
...
src/audioOutputs/audioOutput_osx.c
View file @
92f1bb82
...
...
@@ -23,9 +23,11 @@
#include "../conf.h"
#include "../log.h"
#include <CoreAudio/AudioHardware.h>
#include <stdlib.h>
typedef
struct
_OsxData
{
AudioDeviceID
deviceID
;
}
OsxData
;
static
OsxData
*
newOsxData
()
{
...
...
@@ -34,6 +36,22 @@ static OsxData * newOsxData() {
return
ret
;
}
static
int
osx_testDefault
()
{
int
err
;
AudioDeviceID
deviceID
;
UInt32
propertySize
=
sizeof
(
deviceID
);
err
=
AudioHardwareGetProperty
(
kAudioHardwarePropertyDefaultOutputDevice
,
&
propertySize
,
&
deviceID
);
if
(
err
||
deviceID
==
kAudioDeviceUnknown
)
{
WARNING
(
"Not able to get the default OS X device
\n
"
);
return
-
1
;
}
return
0
;
}
static
int
osx_initDriver
(
AudioOutput
*
audioOutput
,
ConfigParam
*
param
)
{
OsxData
*
od
=
newOsxData
();
...
...
@@ -79,7 +97,7 @@ static int osx_play(AudioOutput * audioOutput, char * playChunk, int size) {
AudioOutputPlugin
osxPlugin
=
{
"osx"
,
NULL
,
osx_testDefault
,
osx_initDriver
,
osx_finishDriver
,
osx_openDevice
,
...
...
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