Skip to content

Commit

Permalink
Merge git://github.com/stump/fofix into fofix_nhBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
erodozer committed Jul 12, 2010
2 parents 604820b + f36e454 commit 5be7c1b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Audio.py
Expand Up @@ -45,17 +45,13 @@
__import__('pygame.mixer_music')
pygame.mixer.music = sys.modules['pygame.mixer_music']

ogg = None
OggStreamer = None
try:
import OggStreamer
Log.debug('Using new OggStreamer module for ogg streaming.')
except ImportError:
Log.warn('OggStreamer not found. Falling back to legacy pyogg/pyvorbis based ogg streamer.')
try:
import ogg.vorbis
except ImportError:
Log.warn("PyOGG not found. OGG files will be fully decoded prior to playing; expect absurd memory usage.")
import ogg.vorbis

class Audio:
def pre_open(self, frequency = 22050, bits = 16, stereo = True, bufferSize = 1024):
Expand Down Expand Up @@ -276,7 +272,7 @@ def run(self, ticks):
self.channel.queue(snd)
self.channel.set_volume(self.volume)

if OggStreamer is None and ogg is not None:
if OggStreamer is None:
class OggStream(object):
def __init__(self, inputFileName):
self.file = ogg.vorbis.VorbisFile(inputFileName)
Expand Down

0 comments on commit 5be7c1b

Please sign in to comment.