| View previous topic :: View next topic |
| Author |
Message |
Ironhand
Joined: 16 Jul 2006 Posts: 2
|
Posted: Sun Jul 16, 2006 11:44 am Post subject: Problems with tutorial script (aplayer.py) |
|
|
Hello,
I've just downloaded, compiled & installed the latest pymedia sources on two systems. I'm trying to run the script at http://pymedia.org//tut/src/aplayer.py.html , but on both systems there are problems.
The first system is running Debian Sarge and uses OSS sound drivers. Trying to run aplayer.py, it reports "Cannot play sound to non existent device 1 out of 0". Obviously sound.getODevices() isn't returning anything, however other programs (such as ogg123) have no problems at all with playback.
The second system is running Debian Sid and uses ALSA. There is actually sound when I run aplayer.py there, but trying to play an OGG file, the sound is extremely choppy (the frequency of the choppiness would seem to correspond to the "for fr in frames:" loop). Playing the same file with ogg123 once again gives no problems at all.
Any tips to resolve these problems? |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Sun Jul 16, 2006 2:36 pm Post subject: |
|
|
Can you try other examples such as player or play_wav ?
They are available on sf.net |
|
| Back to top |
|
 |
Ironhand
Joined: 16 Jul 2006 Posts: 2
|
Posted: Mon Jul 17, 2006 4:06 am Post subject: |
|
|
On the Debian Sarge system:
5:ar@rin#6237/0:~$ python player.py /pub/music/Bathory/1989-Hammerheart/01.Shores_In_Flames.ogg
Traceback (most recent call last):
File "player.py", line 13, in ?
YV12= pygame.YV12_OVERLAY
AttributeError: 'module' object has no attribute 'YV12_OVERLAY'
5:ar@rin#6238/1:~$ python play_wav.py /tmp/track01.cdda.wav
ALSA lib confmisc.c:670:(snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:391:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1070:(snd_func_refer) error evaluating name
ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3947:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2146:(snd_pcm_open_noupdate) Unknown PCM default
On the Debian Sid system:
ar@gre#6211/134:~$ python player.py /pub/music/Bathory/1989-Hammerheart/01.Shores_In_Flames.ogg
Xlib: connection to ":0.0" refused by server
Xlib: XDM authorization key matches an existing client!
open /dev/sequencer: No such file or directory
Playing /pub/music/Bathory/1989-Hammerheart/01.Shores_In_Flames.ogg...
ALSA lib pcm_dmix.c:862:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:862:(snd_pcm_dmix_open) unable to open slave
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/pymedia/player.py", line 798, in _readerLoop
self._processAudioFrame( d )
File "/usr/lib/python2.3/site-packages/pymedia/player.py", line 343, in _processAudioFrame
self.snd= sound.Output( afr.sample_rate, 2, sound.AFMT_S16_LE, self.audioCard )
SoundError: Cannot create sound object. Error text is: -16, Device or resource busy
Error detected
Cannot create sound object. Error text is: -16, Device or resource busy
play_wav.py on the Debian Sid system does play, but with the same choppiness I described.
Edit: actually I just realised, it seems play_wav is trying to use ALSA on the Sarge system which is actually OSS-only... the pymedia site indicates pymedia uses OSS, is this information outdated or does play_wav enforce ALSA in some way? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|