badaix / snapdroid

Snapcast client for Android
GNU General Public License v3.0
135 stars 26 forks source link

App can't connect to latest develop server #35

Closed daniele-athome closed 3 years ago

daniele-athome commented 3 years ago

It's probably normal (it's a development version), but I thought you wanted to know: the latest Android app (Play Store) can't receive audio stream from the latest snapserver (develop branch). I'll have logs for you later.

badaix commented 3 years ago

It's not normal, please provide logs. Can the App receive audio from the 0.23 server? Does the App connect to the server?

daniele-athome commented 3 years ago

App can control the server (mute/unmute, change volume) but when I click the Play button audio doesn't come in my phone.

Logs from server:

feb 03 11:41:59 rasp snapserver[16902]: StreamServer::NewConnection: 192.168.0.103
feb 03 11:41:59 rasp snapserver[16902]: Hello from cfba28f0-3339-48ea-80e6-7426830806fe, host: moto x4, v0.23.0, ClientName: Snapclient, OS: Android 9, Arch: arm64-v8a, Protocol version: 2
feb 03 11:41:59 rasp snapserver[16902]: Error reading message header of length 0: End of file
feb 03 11:41:59 rasp snapserver[16902]: onDisconnect: cfba28f0-3339-48ea-80e6-7426830806fe
feb 03 11:41:59 rasp snapserver[16902]: Error in socket shutdown: Transport endpoint is not connected

Logs from app:

02-03 11:48:19.722 13817 13817 D Service : Running on a non-TV Device
02-03 11:48:19.726 13817 13817 D Service : startProcess
02-03 11:48:19.727 13817 13817 I Service : Configured engine: Auto, active engine: oboe, sampleformat: 48000:16:*
02-03 11:48:20.146 13817 18480 D Main    : onPlayerStart
02-03 11:48:20.146 13817 13817 D Main    : updateStartStopMenuItem: ic_media_stop
02-03 11:48:20.236 13817 18480 D Main    : [Info] (Connection) Connecting
02-03 11:48:20.243 13817 18480 D Main    : [Notice] (Connection) Connected to 192.168.0.200
02-03 11:48:20.243 13817 18480 D Main    : [Info] (Connection) My MAC: "00:00:00:00:00:00", socket: 7
02-03 11:48:20.247 13817 18241 D TCP     : Received Message: '{"jsonrpc":"2.0","method":"Client.OnConnect","params":{"client":{"config":{"instance":1,"latency":0,"name":"","volume":{"muted":false,"percent":100}},"connected":true,"host":{"arch":"arm64-v8a","ip":"192.168.0.103","mac":"00:00:00:00:00:00","name":"moto x4","os":"Android 9"},"id":"cfba28f0-3339-48ea-80e6-7426830806fe","lastSeen":{"sec":1612349300,"usec":667072},"snapclient":{"name":"Snapclient","protocolVersion":2,"version":"0.23.0"}},"id":"cfba28f0-3339-48ea-80e6-7426830806fe"}}'
02-03 11:48:20.248 13817 18480 D Main    : [Info] (Controller) ServerSettings - buffer: 400, latency: 0, volume: 100, muted: 0
02-03 11:48:20.249 13817 18480 D Main    : [Fatal] (Snapclient) Exception: codec not supported: "opus"
02-03 11:48:20.249 13817 18480 D Main    : [Notice] (Snapclient) Snapclient terminated.
02-03 11:48:20.252 13817 18241 D TCP     : Received Message: '{"jsonrpc":"2.0","method":"Client.OnDisconnect","params":{"client":{"config":{"instance":1,"latency":0,"name":"","volume":{"muted":false,"percent":100}},"connected":false,"host":{"arch":"arm64-v8a","ip":"192.168.0.103","mac":"00:00:00:00:00:00","name":"moto x4","os":"Android 9"},"id":"cfba28f0-3339-48ea-80e6-7426830806fe","lastSeen":{"sec":1612349300,"usec":672270},"snapclient":{"name":"Snapclient","protocolVersion":2,"version":"0.23.0"}},"id":"cfba28f0-3339-48ea-80e6-7426830806fe"}}'

I'm sorry I'm an idiot: codec not supported "opus". I changed the codec along with updating the server. I'll create a feature request for the opus codec :angel:

badaix commented 3 years ago

Thanks for the logs. This explains why my Android client is working (I'm on FLAC). It's not a feature request, it's a bug in the Snapcast project (please open an issue there). Seems that there is a Preprocessor Flag missing. I've deferred the PlayStore release for a while, because this release is the first automated build from GitHub actions using CMake instead of make. So I decided to let the community install the release from GitHub (there were 77 downloads) and wait for feedback like yours ;)

daniele-athome commented 3 years ago

Ok thanks. I'd already opened https://github.com/badaix/snapdroid/issues/36 would you mind moving it to snapcast?

badaix commented 3 years ago

Moving between projects is not possible