Closed GoogleCodeExporter closed 9 years ago
using python stardart library as this:
import wave, ossaudiodev
try:
wv = wave.open('test.wav','rb')
num_ch, samp_width, frmrate, nframes, cptype, cpname = wv.getparams()
try:
fl = ossaudiodev.open("/dev/dsp", "rw")
fl.setparameters(ossaudiodev.AFMT_S16_LE, num_ch, frmrate)
fl.writeall(wav.readframes(nframes))
finally:
fl.close()
finally:
wv.close()
but, will be placed a different sound for each action?
best regards,
leonardo.
Original comment by leogregianin@gmail.com
on 31 Jan 2007 at 12:03
If you grab the 0.7 branch:
svn checkout http://pychess.googlecode.com/svn/branches/0.7/ pychess
You can take a look at the gui in Preferences -> Preferences -> Sounds. Which is
supposed to be the place to set up different sounds (or no sound) for each
action.
Your standard library code looks good. Also in the way that it won't make us
depend
on gstreamer. On the other hand it won't be able to play ogg's and stuff.
Perhaps we should test if the user has gstreamer available, and if he doesn't
we fail
back to allow only system beep and wav files.
It would be good to take the coding discussion somewhere else though, as this
thread
should focus on deciding for which actions it should be possible to assign
sounds.
Original comment by lobais
on 31 Jan 2007 at 3:27
I think we'd just go for
A player moves
A player checks
A player captures
-------------------
Game is set-up
Game is won
Game is lost
Game is drawn
-------------------
Observed moves
Observed ends
At least for Philidor.
Original comment by lobais
on 16 Jun 2007 at 4:52
Original issue reported on code.google.com by
lobais
on 3 Jan 2007 at 9:11