{"id":16237681,"url":"https://github.com/pschatzmann/arduino-snapclient","last_synced_at":"2025-07-20T06:04:16.359Z","repository":{"id":203126611,"uuid":"708880949","full_name":"pschatzmann/arduino-snapclient","owner":"pschatzmann","description":"Snapcast client for Arduino","archived":false,"fork":false,"pushed_at":"2025-03-22T08:56:42.000Z","size":1722,"stargazers_count":51,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-01T21:22:25.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pschatzmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-23T15:14:21.000Z","updated_at":"2025-03-22T08:56:49.000Z","dependencies_parsed_at":"2024-10-24T03:39:20.702Z","dependency_job_id":"f90798ef-52e6-4686-b675-b63ace05c779","html_url":"https://github.com/pschatzmann/arduino-snapclient","commit_stats":null,"previous_names":["pschatzmann/arduino-snapcast"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pschatzmann/arduino-snapclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-snapclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-snapclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-snapclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-snapclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pschatzmann","download_url":"https://codeload.github.com/pschatzmann/arduino-snapclient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-snapclient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266076035,"owners_count":23872729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T13:36:40.020Z","updated_at":"2025-07-20T06:04:16.292Z","avatar_url":"https://github.com/pschatzmann.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snapcast Client for Arduino \n\n### Snapcast Audio Streaming Client for Arduino\n\n[Snapcast](https://github.com/badaix/snapcast) is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio\n\n### Feature list\n\n- Header only C++ implementation\n- PCM, Opus decoding is supported\n- Auto connect to snapcast server on network\n- The functionality has been tested on an ESP32\n- Memory efficient implementation, so that PSRAM is not needed\n- Use any output device or DSP chain suppored by the [Audio Tools](https://github.com/pschatzmann/arduino-audio-tools)\n- Flexible design so that you can choose from different processor implementations and synchronizers.\n\nThe disadvantage of these goals is, that you need to fine tune the solution to have it working as you want. \n\n### Description\n\nI have rewritten the [snapclient](https://github.com/jorgenkraghjakobsen/snapclient) from Jørgen Kragh Jakobsen to an Arduino Library and integrated my AudioTools project to be used to define the output devices.\n\n### Example Arduino Sketch\n\nHere is an example Arduino sketch that uses the Wifi as communication API, the WAVs codec and outputs the audio with I2S: \n\n```C++\n#include \"AudioTools.h\"\n#include \"SnapClient.h\"\n#include \"AudioTools/AudioCodecs/CodecOpus.h\" // https://github.com/pschatzmann/arduino-libopus\n//#include \"api/SnapProcessorRTOS.h\" // install https://github.com/pschatzmann/arduino-freertos-addons\n\nOpusAudioDecoder codec;\nWiFiClient wifi;\nI2SStream out;\nSnapClient client(wifi, out, codec);\n\nvoid setup() {\n  Serial.begin(115200);\n  \n  // login to wifi -\u003e Define values in SnapConfig.h or replace them here\n  WiFi.begin(CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD);\n  Serial.print(\"Connecting to WiFi ..\");\n  while (WiFi.status() != WL_CONNECTED) {\n    Serial.print('.');\n    delay(1000);\n  }\n\n  // print ip address\n  Serial.println();\n  Serial.println(WiFi.localIP());\n\n  // setup I2S to define custom pins\n  auto cfg = out.defaultConfig();\n  config.pin_bck = 14;\n  config.pin_ws = 15;\n  config.pin_data = 22;\n  // cfg.buffer_size = 512;\n  // cfg.buffer_count = 40;\n  out.begin(cfg);\n\n  // Use FreeRTOS\n  //client.setSnapProcessor(rtos);\n\n  // Define CONFIG_SNAPCAST_SERVER_HOST in SnapConfig.h or here\n  // client.setServerIP(IPAddress(192,168,1,33));\n\n  // start snap client\n  client.begin();\n}\n\nvoid loop() {\n  client.doLoop();\n}\n\n```\nChange the snapserver.conf to define ```codec = opus``` and restart the snapserver with ```sudo service snapserver restart```.\nYou can test now your sketch e.g. with ```ffmpeg -i http://stream.srg-ssr.ch/m/rsj/mp3_128 -f s16le -ar 48000 /tmp/snapfifo```\n\nFor further information on codecs please check the information in the Wiki!\n\n\n### Documentation\n\nFor further information \n- consult the [class documentation](https://pschatzmann.github.io/arduino-snapclient/html/annotated.html) or\n- the [examples](examples/)\n- the Wiki\n\n\n### Dependencies\n\n- [Audio Tools](https://github.com/pschatzmann/arduino-audio-tools) (mandatory)\n- [LibOpus](https://github.com/pschatzmann/arduino-libopus) (optional)\n- [LibFLAC.h](https://github.com/pschatzmann/arduino-libflac) (optinal)\n- [CodecVorbis](https://github.com/pschatzmann/arduino-libvorbis-idec) (optional)\n\n\n### Configuration\n\nConfiguration settings can be found in [SnapConfig.h](https://github.com/pschatzmann/arduino-snapcast/blob/main/src/SnapConfig.h)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschatzmann%2Farduino-snapclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpschatzmann%2Farduino-snapclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschatzmann%2Farduino-snapclient/lists"}