• # modif

    Posté par . En réponse au journal PyAlsaCap : Python, pointeurs, et cartes sons.... Évalué à 2. Dernière modification le 20 mars 2013 à 11:33.

    pour info, sous ub***tu, j'ai dû modifier le script pour que cela fonctionne (et le rendre compatible python2&3), cela est dû a une signature différente pour 2 des fonctions de la lib libasound.

    13d12
    < from __future__ import print_function
    155,156d153
    < NULL = c_void_p()
    < 
    214c211
    < self.libasound.snd_ctl_close(c_handle)
    ---
    > self.libasound.snd_ctl_close(handle)
    256,257c253,254
    < self.libasound.snd_pcm_hw_params_get_rate_min(c_pars, byref(c_min), NULL)
    < self.libasound.snd_pcm_hw_params_get_rate_max(c_pars, byref(c_max), NULL)
    ---
    > self.libasound.snd_pcm_hw_params_get_rate_min(c_pars, byref(c_min))
    > self.libasound.snd_pcm_hw_params_get_rate_max(c_pars, byref(c_max))
    340c337
    < print(str(channels[0]) + ".." + str(channels[1]), end='')
    ---
    > print(str(channels[0] + ".." + str(channels[1]), end=''))