Update of /cvsroot/pyamp/pyamp/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26053/src
Modified Files:
mainwindow.py mp3song.py playlist.py songthread.py
Log Message:
using pyao instead of python built-in audio device
Index: mainwindow.py
===================================================================
RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mainwindow.py 26 Sep 2003 04:51:32 -0000 1.6
--- mainwindow.py 5 Jan 2004 00:34:13 -0000 1.7
***************
*** 617,621 ****
def exit(self):
! KApplication.kApplication().quit()
def queryClose(self):
--- 617,621 ----
def exit(self):
! KApplication.exit()
def queryClose(self):
Index: mp3song.py
===================================================================
RCS file: /cvsroot/pyamp/pyamp/src/mp3song.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mp3song.py 20 Sep 2003 17:08:48 -0000 1.2
--- mp3song.py 5 Jan 2004 00:34:13 -0000 1.3
***************
*** 20,24 ****
from mad import MadFile
from time import sleep
! import linuxaudiodev
class Mp3Song(Song):
--- 20,24 ----
from mad import MadFile
from time import sleep
! import ossaudiodev
class Mp3Song(Song):
***************
*** 36,40 ****
def getParameters(self):
! return (self.sampleRate, 16, 2, linuxaudiodev.AFMT_S16_NE)
def getBitrate(self):
--- 36,40 ----
def getParameters(self):
! return (ossaudiodev.AFMT_S16_LE, 2, self.sampleRate)
def getBitrate(self):
Index: playlist.py
===================================================================
RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** playlist.py 3 Oct 2003 08:29:46 -0000 1.7
--- playlist.py 5 Jan 2004 00:34:13 -0000 1.8
***************
*** 100,103 ****
--- 100,105 ----
SIGNAL("backgroundUpdated(const QPixmap &)"),
self.updateBackground)
+ color = self.config.readColorEntry("normalBase")
+ self.setPaletteBackgroundColor(color)
except:
pass
***************
*** 308,311 ****
--- 310,314 ----
self.getPlayingSong().setPlaying(False)
if song is None:
+ self.setPlaying(False)
self.songThread.pause()
name = ""
Index: songthread.py
===================================================================
RCS file: /cvsroot/pyamp/pyamp/src/songthread.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** songthread.py 29 Sep 2003 03:34:04 -0000 1.2
--- songthread.py 5 Jan 2004 00:34:13 -0000 1.3
***************
*** 19,23 ****
from qt import *
from time import sleep
! import linuxaudiodev
from songfactory import SongFactory
--- 19,23 ----
from qt import *
from time import sleep
! from ao import AudioDevice
from songfactory import SongFactory
***************
*** 48,54 ****
buf = self.song.read()
if buf:
! while self.dev.obuffree() < len(buf):
! sleep(0.1)
! self.dev.write(buf)
time = self.song.getCurrentTime()
else:
--- 48,55 ----
buf = self.song.read()
if buf:
! #~ while self.dev.obuffree() < len(buf):
! #~ sleep(0.1)
! #~ self.dev.write(buf)
! self.dev.play(buf, len(buf))
time = self.song.getCurrentTime()
else:
***************
*** 67,72 ****
# Song factory return None for invalid song
if song is not None:
! self.dev = linuxaudiodev.open("w")
! apply(self.dev.setparameters, song.getParameters())
self.song = song
self.fullpath = fullpath
--- 68,74 ----
# Song factory return None for invalid song
if song is not None:
! #~ self.dev = ossaudiodev.open("w")
! #~ apply(self.dev.setparameters, song.getParameters())
! self.dev = AudioDevice('alsa09', rate=44100)
self.song = song
self.fullpath = fullpath
|