{"id":26154445,"url":"https://github.com/binozo/gotinyalsa","last_synced_at":"2025-08-17T01:06:59.700Z","repository":{"id":205614141,"uuid":"714418420","full_name":"Binozo/GoTinyAlsa","owner":"Binozo","description":"Native Go bindings for TinyAlsa","archived":false,"fork":false,"pushed_at":"2024-08-23T13:51:57.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T08:36:05.812Z","etag":null,"topics":["alsa","go","tinyalsa"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Binozo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-11-04T20:57:04.000Z","updated_at":"2024-08-23T13:52:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"984312e3-950b-4dbe-aaee-54b3622bc3f1","html_url":"https://github.com/Binozo/GoTinyAlsa","commit_stats":null,"previous_names":["binozo/gotinyalsa"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Binozo/GoTinyAlsa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binozo%2FGoTinyAlsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binozo%2FGoTinyAlsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binozo%2FGoTinyAlsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binozo%2FGoTinyAlsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Binozo","download_url":"https://codeload.github.com/Binozo/GoTinyAlsa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binozo%2FGoTinyAlsa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270792275,"owners_count":24646070,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alsa","go","tinyalsa"],"created_at":"2025-03-11T08:29:35.483Z","updated_at":"2025-08-17T01:06:58.933Z","avatar_url":"https://github.com/Binozo.png","language":"Go","readme":"# GoTinyAlsa 🚀\n\nGo bindings for [TinyAlsa](https://github.com/tinyalsa/tinyalsa)\n\nFeatures:\n- ⚡ Easy yet powerful API\n- 📱 Android support\n- 🤓☝️ well documented\n\n## Installation\n```\n$ go get -u github.com/Binozo/GoTinyAlsa\n```\n## Troubleshooting\n#### Linking\nIf you get the following error: `error while loading shared libraries: libtinyalsa.so.2: cannot open shared object file: No such file or directory`\nand you built tinyalsa from source, make sure you set `LD_LIBRARY_PATH=/usr/local/lib` as an environment variable.\n\n#### Deprecation warnings\nThose warnings\n```shell\n# github.com/Binozo/GoTinyAlsa/internal/tinyapi\ncgo-gcc-prolog: In function ‘_cgo_ee639364c86c_Cfunc_pcm_read’:\ncgo-gcc-prolog:152:2: warning: ‘pcm_read’ is deprecated [-Wdeprecated-declarations]\nIn file included from /usr/local/include/tinyalsa/asoundlib.h:33,\nfrom ../internal/tinyapi/device.go:5:\n```\nare normal and to ensure compatibility with Android, we need to use those deprecated functions.\nTake a look [here](https://github.com/tinyalsa/tinyalsa/blob/google-origin/include/tinyalsa/asoundlib.h) for available APIs for the Android platform.\n\n## Quickstart\n\u003e [!NOTE]\n\u003e Take a look at the `examples` folder for example usage.\n\n### Create your device\n```go\npackage main\n\nimport \"github.com/Binozo/GoTinyAlsa\"\n\nfunc main() {\n\t// You need to set deviceCard and deviceNr yourself\n\t// To list output devices, execute 'aplay -L'\n\t// To list input devices, execute 'arecord -L'\n\tdeviceCard := 4\n\tdeviceNr := 0\n\tdevice := tinyalsa.NewDevice(deviceCard, deviceNr, pcm.Config{\n\t\tChannels:    1,\n\t\tSampleRate:  48000,\n\t\tPeriodSize:  2048,\n\t\tPeriodCount: 20,\n\t\tFormat:      tinyalsa.PCM_FORMAT_S16_LE,\n\t})\n}\n```\n\n### Wait until it's ready\n```go\n    // Wait until our microphone (PCM_IN) input is ready with the maximum duration of 2 seconds\n\terr := device.WaitUntilReady(tinyalsa.PCM_IN, time.Second*2)\n\tif err != nil {\n\t\tfmt.Println(\"An error occurred while waiting until device is ready:\", err)\n\t}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinozo%2Fgotinyalsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinozo%2Fgotinyalsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinozo%2Fgotinyalsa/lists"}