{"action":"opened","issue":{"url":"https://api.github.com/repos/intxcc/pyaudio_portaudio/issues/4","repository_url":"https://api.github.com/repos/intxcc/pyaudio_portaudio","labels_url":"https://api.github.com/repos/intxcc/pyaudio_portaudio/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/intxcc/pyaudio_portaudio/issues/4/comments","events_url":"https://api.github.com/repos/intxcc/pyaudio_portaudio/issues/4/events","html_url":"https://github.com/intxcc/pyaudio_portaudio/issues/4","id":233775452,"number":4,"title":"Using pyaudio in multithreading?","user":{"login":"dyan1024","id":18654827,"avatar_url":"https://avatars3.githubusercontent.com/u/18654827?v=3","gravatar_id":"","url":"https://api.github.com/users/dyan1024","html_url":"https://github.com/dyan1024","followers_url":"https://api.github.com/users/dyan1024/followers","following_url":"https://api.github.com/users/dyan1024/following{/other_user}","gists_url":"https://api.github.com/users/dyan1024/gists{/gist_id}","starred_url":"https://api.github.com/users/dyan1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyan1024/subscriptions","organizations_url":"https://api.github.com/users/dyan1024/orgs","repos_url":"https://api.github.com/users/dyan1024/repos","events_url":"https://api.github.com/users/dyan1024/events{/privacy}","received_events_url":"https://api.github.com/users/dyan1024/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-06T04:22:27Z","updated_at":"2017-06-06T04:22:27Z","closed_at":null,"body":"I want to play voice in multithreading.one child thread play voice,parent thread send voice info to child and control child to stop play .\r\nI got some trouble.This is a reduced version of the program.\r\n![2017-06-06 11-17-18](https://cloud.githubusercontent.com/assets/18654827/26812601/4546b878-4aab-11e7-927c-736cc72ebac4.png)\r\nI **got crash,but not catch any exception**,output:\r\n`0`                                                            #child loop first\r\n`[Errno Unanticipated host error] -9999`  #when parent stop_stream(),child catch IOError,\r\n`0`                                                            #child loop second\r\nbut in my complete code this no problem in 1~2h,then it crash and not catch any exception.\r\nif delete the 42 line\r\nthis reduced can run perfectly at last 10h,this takes too much time,i just test this once,it looks no problem.\r\nbut in my complete code,there no stream.close() no time.sleep(),it just run 10～30min,then pa.open() raise IOError : [Errno Illegal combination of I/O devices] -9993,cannot play anymore.if restart this pa.open() raise other IOError:('Invalid sample rate', -9997).I can't use pyaudio anymore except reboot computer.\r\n\r\ni think this problem in complete code maybe sometimes there no sleep to wait stop_stream() done work .if that,how can i know stop_stream() done its work?\r\nif not,how can i using pyaudio like this in multithreading?\r\nthanks for help!"}}
{"actor":{"display_login":"dyan1024"}}