rodrwan

Reproductor-de-audio-python

Apr 12th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import alsaaudio
  4.  
  5. out = alsaaudio.PCM(alsaaudio.PCM_PLAYBACK)
  6. out.setchannels(1)
  7. out.setrate(8000)
  8. out.setformat(alsaaudio.PCM_FORMAT_S16_LE)
  9. out.setperiodsize(160)
  10.  
  11. while True:
  12.     #ingresar algún método para recibir la data
  13.     out.write(data)
Advertisement
Add Comment
Please, Sign In to add comment