Skip to content

Commit

Permalink
On Mac OS X, make CoreAudio default and Mad non-default.
Browse files Browse the repository at this point in the history
  • Loading branch information
rryan committed Jul 14, 2013
1 parent 9119a92 commit 341cef8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions build/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,19 @@ class Mad(Feature):
def description(self):
return "MAD MP3 Decoder"

def default(self, build):
return 0 if build.platform_is_osx else 1

def enabled(self, build):
build.flags['mad'] = util.get_flags(build.env, 'mad', 1)
build.flags['mad'] = util.get_flags(build.env, 'mad',
self.default(build))
if int(build.flags['mad']):
return True
return False

def add_options(self, build, vars):
vars.Add('mad', 'Set to 1 to enable MAD MP3 decoder support.', 1)
vars.Add('mad', 'Set to 1 to enable MAD MP3 decoder support.',
self.default(build))

def configure(self, build, conf):
if not self.enabled(build):
Expand All @@ -168,14 +173,18 @@ class CoreAudio(Feature):
def description(self):
return "CoreAudio MP3/AAC Decoder"

def default(self, build):
return 1 if build.platform_is_osx else 0

def enabled(self, build):
build.flags['coreaudio'] = util.get_flags(build.env, 'coreaudio', 0)
build.flags['coreaudio'] = util.get_flags(build.env, 'coreaudio', self.default(build))
if int(build.flags['coreaudio']):
return True
return False

def add_options(self, build, vars):
vars.Add('coreaudio', 'Set to 1 to enable CoreAudio MP3/AAC decoder support.', 0)
vars.Add('coreaudio', 'Set to 1 to enable CoreAudio MP3/AAC decoder support.',
self.default(build))

def configure(self, build, conf):
if not self.enabled(build):
Expand Down Expand Up @@ -1073,4 +1082,3 @@ def sources(self, build):
'library/bundledsongswebview.cpp',
"library/featuredartistswebview.cpp",
]

0 comments on commit 341cef8

Please sign in to comment.