On Fri, 16 Sep 2016, Cristian Ionescu-Idbohrn wrote: > > and sound out the TV speakers. Fun :)
One thing I noticed is that if I _first_ start mkchromecast and play some sound file _after_, the player (in this case mpg123) will bail out with: ,---- | [format.c:295] error: Unable to set up output format! Constraints: 44100, 22050 or 11025Hz. | [mpg123.c:695] error: ...in decoding next frame: Unable to set up output format! (code 1) `---- If I now kill (^C) mkchromecast, I get this trace: ,---- | 192.168.x.y - - [16/Sep/2016 14:01:07] "GET /stream HTTP/1.1" 200 - | Process Process-1: | Traceback (most recent call last): | File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap | self.run() | File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run | self._target(*self._args, **self._kwargs) | File ".../mkchromecast/audio.py", line 523, in start_app | app.run(host= '0.0.0.0') | File "/usr/lib/python2.7/dist-packages/flask/app.py", line 843, in run | run_simple(host, port, self, **options) | File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 694, in run_simple | inner() | File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 659, in inner | srv.serve_forever() | File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 499, in serve_forever | HTTPServer.serve_forever(self) | File "/usr/lib/python2.7/SocketServer.py", line 233, in serve_forever | self._handle_request_noblock() | File "/usr/lib/python2.7/SocketServer.py", line 292, in _handle_request_noblock | self.handle_error(request, client_address) | File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock | self.process_request(request, client_address) | File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request | self.finish_request(request, client_address) | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request | self.RequestHandlerClass(request, client_address, self) | File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__ | self.finish() | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish | self.wfile.close() | File "/usr/lib/python2.7/socket.py", line 283, in close | self.flush() | File "/usr/lib/python2.7/socket.py", line 307, in flush | self._sock.sendall(view[write_offset:write_offset+buffer_size]) | error: [Errno 32] Broken pipe `---- The terminal gets messed up and needs to be `reset'. If I first start the player and mkchromecast after, it works fine. I can stop and start the player as I please, no apparent troubles. Cheers, -- Cristian