diff --git a/README.md b/README.md index c787bc59..0a196e5e 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ Different streams can by configured with a list of `-s` options, e.g.: SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac -s file:///home/user/Musik/Some%20wave%20file.wav?name=File" +The pipe stream (`-s pipe`) will per default create the pipe. Sometimes your audio source might insist in creating the pipe itself. So the pipe creation mode can by changed to "not create, but only read mode", using the `mode` option set to `create` or `read`: + + SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo?name=Radio&mode=read" + Test ---- You can test your installation by copying random data into the server's fifo file @@ -184,7 +188,7 @@ Unordered list of features that should make it into the v1.0 - [X] **Debian packages** prebuild deb packages - [X] **Endian** independent code - [X] **OpenWrt** port Snapclient to OpenWrt -- [ ] **Hi-Res audio** support (like 192kHz 24bit) +- [X] **Hi-Res audio** support (like 192kHz 24bit) +- [ ] **JSON-RPC** Possibility to add, remove, rename streams - [ ] **Protocol specification** Snapcast binary streaming protocol, JSON-RPC protocol -- [ ] **CMake** or another build system -- [ ] **Ports** Snapclient for Windows, ... +- [ ] **Ports** Snapclient for Windows, Mac OS X, ... diff --git a/android/Snapcast/src/main/assets/bin/armeabi-v7a/snapclient b/android/Snapcast/src/main/assets/bin/armeabi-v7a/snapclient index 0a2baedf..9dceb5af 100755 Binary files a/android/Snapcast/src/main/assets/bin/armeabi-v7a/snapclient and b/android/Snapcast/src/main/assets/bin/armeabi-v7a/snapclient differ diff --git a/android/Snapcast/src/main/assets/bin/armeabi/snapclient b/android/Snapcast/src/main/assets/bin/armeabi/snapclient index ea189179..2d2e015a 100755 Binary files a/android/Snapcast/src/main/assets/bin/armeabi/snapclient and b/android/Snapcast/src/main/assets/bin/armeabi/snapclient differ diff --git a/android/Snapcast/src/main/res/values-ja/strings.xml b/android/Snapcast/src/main/res/values-ja/strings.xml new file mode 100644 index 00000000..63ad6c09 --- /dev/null +++ b/android/Snapcast/src/main/res/values-ja/strings.xml @@ -0,0 +1,50 @@ + + Snapcast + Snapclient 開始しました + Snapclient + Snapclient は実行中です... + 情報... + 停止 + 詳細 + 削除 + + + Snapcast + + アプリについて... + 設定... + サーバーのスキャン + クライアント一覧の更新 + オフラインのクライアントを非表示 + + クライアント設定 + 名前 + MAC + IP + ホスト + OS + バージョン + 最後の視聴 + レイテンシー + オンライン + 再生/停止 + クライアント %1$s を削除しました + ストリームはネイティブのサンプリングレートではありません: %1$s\nネイティブのサンプリングレート: %2$s + ネイティブのサンプリングレートではないストリームは同期して再生されないことがあります + 元に戻す + アプリについて + files/about.html + アプリについて + + + Hello blank fragment + ストリーム + 警告 + これはテストクライアントです。\n正式利用用途ではありません。 + ホスト + ストリーム ポート + コントロール ポート + Snapserver ホスト + Snapclient を自動開始 + + diff --git a/control/control.py b/control/control.py index 4e83cf16..d4c07548 100755 --- a/control/control.py +++ b/control/control.py @@ -35,13 +35,20 @@ def setName(client, name): requestId = requestId + 1 if sys.argv[2] == "setVolume": - if len(sys.argv) < 4: - print("usage: control.py setVolume ") + if len(sys.argv) < 5: + print("usage: control.py setVolume [+/-]") exit(0) - volume = int(sys.argv[3]) + volstr = sys.argv[4] j = doRequest(json.dumps({'jsonrpc': '2.0', 'method': 'Server.GetStatus', 'id': 1}), 1) for client in j["result"]["clients"]: - setVolume(client["host"]["mac"], volume) + if(sys.argv[3] == client['host']['name'] or sys.argv[3] == 'all'): + if(volstr[0] == '+'): + volume = int(client['config']['volume']['percent']) + int(volstr[1:]) + elif(volstr[0] == '-'): + volume = int(client['config']['volume']['percent']) - int(volstr[1:]) + else: + volume = int(volstr) + setVolume(client['host']['mac'], volume) elif sys.argv[2] == "setName": if len(sys.argv) < 5: @@ -54,7 +61,7 @@ else: j = doRequest(json.dumps({'jsonrpc': '2.0', 'method': 'Server.GetStatus', 'id': 1}), 1) for client in j["result"]["clients"]: - print("MAC: " + client["host"]["mac"] + ", conntect: " + str(client['connected']) + ", volume: " + str(client["config"]["volume"]["percent"]) + ", name: " + client["config"]["name"] + ", host: " + client["host"]["name"]) + print("MAC: " + client['host']['mac'] + ", connect: " + str(client['connected']) + ", volume: " + str(client['config']['volume']['percent']) + ", name: " + client['host']['name'] + ", host: " + client['host']['ip']) telnet.close diff --git a/server/streamServer.cpp b/server/streamServer.cpp index d93eca19..9022b05b 100644 --- a/server/streamServer.cpp +++ b/server/streamServer.cpp @@ -379,8 +379,9 @@ void StreamServer::start() acceptor_ = make_shared(*io_service_, tcp::endpoint(tcp::v4(), settings_.port)); startAccept(); } - catch (const std::exception&) + catch (const std::exception& e) { + logS(kLogNotice) << "StreamServer::start: " << e.what() << endl; stop(); throw; }