Well that was fast! That fixed it! I don't know anything about pygame but I blindly copied an pasted:
pygame.mixer.pre_init(44100,-16,2, 1024 * 3) Above the pygame.init() call in pycdg.py and it seems to solve the problem. "scratchy" is a very good way of describing the playback before and now it sounds normal. I will send the ogg file off list so that you can test for yourself. (btw it's not just this file but all ogg files) A few other thing which may or may not be worth noting: I don't have mp3 playback set up, I read in the documentation somewhere that it required recompiling SDL (and I could be arsed as didn't want to use mp3 anyway) I'm running Fedora core 4 My python version says: Python 2.4.1 (#1, May 16 2005, 15:19:29) [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] SDL-1.2.8-4 Drew On Wed, 2006-03-29 at 22:16 +0100, Kelvin Lawson wrote: > Hi, > > Welcome aboard. > > Could you send me the offending ogg file please? I'll see if I can > reproduce the problem here. > > There's a note in the Pygame documentation about "scratchy" playback due > to a lack of buffering. It's apparently a bug on Windows, and it's also > not clear if it applies to the mixer.music module, but it might be worth > a go anyway: > > http://www.pygame.org/docs/ref/mixer.html#pygame.mixer.init > > The suggestion is to do this before the pygame.init() call: > > pygame.mixer.pre_init(44100,-16,2, 1024 * 3) > > Cheers, > Kelvin. > > > Drew wrote: > > Hello, I hope I'm posting this to the right list, feel free to shout > > nasty things at me if I'm not :) > > > > First a little intro: > > A few years ago I got interested in CDG disks and how they work. Long > > story short, I ended up learning a bit about it for the few resources > > which were available on the internet at the time (it seems much better > > these days). I wrote some code (including some to read Q channel data > > for some stupid reason) and then gave up without every completing > > anything useful. > > > > Recently I've started thinking about making a karaoke device. I started > > looking around to see what was available in the open source world these > > days and found pykaraoke and cdgtools both very impressive tools. > > > > I've never coded in python before but it all seems very logical when you > > start looking at the code. > > > > > > Anyway on to my main point :) > > > > I was trying not to use mp3 with a view to keeping everything patent > > free and open source. > > > > I'm having a small problem with ogg and pykaraoke: > > > > I modified cdgrip.py to work with oggenc by just switching th encoder > > line at first I got good cdg files but white noise ogg files. I soon > > realised it was an endainness problem. For some reason oggenc seems to > > work the opposite way to lame (little endian by default I think) I used > > the --raw-endianness 1 switch and it seemed cured. > > > > The problem I'm having now is one of quality when playing the files back > > with pykaraoke, there seems to be noticeable distortion in the playback. > > This doesn't happen if I play back the encoded ogg in XMMS. > > > > I wonder if anyone has any idea about what is going on? > > > > thanks in advance.. > > > > vv > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > > that extends applications into web and mobile media. Attend the live webcast > > and join the prime developer group breaking into this new coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Pykaraoke-discuss mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Pykaraoke-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Pykaraoke-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss
