I'm trying to play sounds using the pyo library.

The following code:

```
from psychopy import sound, logging, core
logging.console.setLevel(logging.DEBUG)
from pyo import *

s = Server()
s.setInputDevice(4)
s.setOutputDevice(4)
s.boot()
s.start()

print "output", pa_get_output_devices()
print "input", pa_get_input_devices()

play_audio1 = sound.SoundPyo(value = 'LRsound.wav', stereo = True)
play_audio1.play()
core.wait(1) # wait so the sound can play  

```

returns this output:

> 
> pyo version 0.8.0 (uses single precision)
> 
> 
> Portmidi warning: could not open midi output 0 (Microsoft MIDI Mapper): PortMidi: `Host error'
> 
> 
> output (['Microsoft Sound Mapper - Output', 'Speakers / Headphones
>  (Realtek ', 'Primary Sound Driver', 'Speakers / Headphones (Realtek
>  High Definition Audio)', 'Realtek ASIO', 'Speakers / Headphones
>  (Realtek High Definition Audio)'], [0, 1, 2, 3, 4, 5]) 
> 
> 
> input (['Realtek ASIO'], [4])
> 
> 
> Server not booted.
>  The Server must be booted!
>  portaudio error in Pa\_OpenStream: Illegal combination of I/O devices
>  Portaudio error: Illegal combination of I/O devicesportaudio error in Pa\_AbortStream: Invalid stream pointer
>  portaudio error in Pa\_CloseStream: Invalid stream pointer
> 
> 
> 

As you can see from the code and the output I've attempted to ensure that the input and output devices are the same.

This is due to the message about illegal combination of I/O devices. Granted, as you can also see my attempt has failed miserably. The same error messages appear with or without the `Server()` code chunk.

I ran the above code in PsychoPy. When I run the same code in Spyder it never actually gets passed:

```
play_audio1 = sound.SoundPyo(value = 'LRsound.wav', stereo = True)

```

it just hangs doing nothing.

Any idea why pyo is not playing with python as it should? Any ideas on how I can fix it?

Thanks for your time.