# Partial success getting PYO to work: help needed!

**URL:** <https://discourse.psychopy.org/t/partial-success-getting-pyo-to-work-help-needed/3091>\
**Category:** Coding\
**Created:** [September 20, 2017, 5:09pm UTC](https://discourse.psychopy.org/t/partial-success-getting-pyo-to-work-help-needed/3091 "2017-09-20T17:09:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fnagle](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fnagle](https://discourse.psychopy.org/u/fnagle)\
**Post date:** [September 22, 2017, 2:36pm UTC](https://discourse.psychopy.org/t/partial-success-getting-pyo-to-work-help-needed/3091/3 "2017-09-22T14:36:21Z")

</div>

PYO now works on my system.

I updated some code in sound/backend\_pyo.py to this:

```auto

        # create the instance of the server:
        if platform in ['darwin', 'linux2']:
            # for mac/linux we set the backend using the server audio param
            pyoSndServer = Server(sr=rate, nchnls=maxChnls,
                                  buffersize=buffer, audio=audioDriver)
        else:
            # with others we just use portaudio and then set the OutputDevice
            # below
            pyoSndServer = Server(sr=rate, nchnls=maxChnls, buffersize=buffer, winhost='asio', duplex=0)

        pyoSndServer.setVerbosity(1)
        if platform == 'win32':
            pyoSndServer.setOutputDevice(outputID)
            if inputID is not None:
                pyoSndServer.setInputDevice(inputID)
        # do other config here as needed (setDuplex? setOutputDevice?)
        pyoSndServer.setDuplex(0)
        pyoSndServer.boot()

```

I’ve made two changes, adding winhost=‘asio’, duplex=0 to the server instantiation and hard-coding 0 in the pyoSndServer.setDuplex(0) call.

Jon - since it seems a few other people have experienced problems like this, would you like me to issue a pull request to configure duplex/ASIO in PYO?

I imagine it would look something like adding a global preference setting for a) duplex and b) Windows audio host (winhost parameter to PYO server), then updating backend\_pyo.py to pay attention to this.

If you think this is a good idea, let me know where in the code you deal with preferences, and I’ll issue a PR.

Cheers,  
Fintan

---

_[View the full topic](https://discourse.psychopy.org/t/partial-success-getting-pyo-to-work-help-needed/3091)._
