{"id":16173136,"url":"https://github.com/joeferner/node-portaudio","last_synced_at":"2025-06-29T22:40:13.434Z","repository":{"id":3981252,"uuid":"5077022","full_name":"joeferner/node-portaudio","owner":"joeferner","description":"Node bindings for PortAudio","archived":false,"fork":false,"pushed_at":"2019-04-10T19:48:19.000Z","size":72,"stargazers_count":26,"open_issues_count":4,"forks_count":101,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T13:18:42.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/joeferner.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}},"created_at":"2012-07-17T03:49:47.000Z","updated_at":"2024-01-24T07:21:26.000Z","dependencies_parsed_at":"2022-08-31T12:23:41.904Z","dependency_job_id":null,"html_url":"https://github.com/joeferner/node-portaudio","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-portaudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-portaudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-portaudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-portaudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeferner","download_url":"https://codeload.github.com/joeferner/node-portaudio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955757,"owners_count":20374373,"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-10T04:06:38.342Z","updated_at":"2025-03-19T00:30:46.139Z","avatar_url":"https://github.com/joeferner.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# portaudio\n\nNode wrapper around [PortAudio](http://www.portaudio.com/)\n\n**Note: This module has not been tested on windows. If you would like to submit a pull request that would be great.**\n\n**Note: You must install PortAudio libs first.**\n\n## Example\n\n```javascript\nvar portAudio = require('portaudio');\n\n// create a sine wave lookup table\nvar sampleRate = 44100;\nvar tableSize = 200;\nvar buffer = new Buffer(tableSize);\nfor (var i = 0; i \u003c tableSize; i++) {\n  buffer[i] = (Math.sin((i / tableSize) * 3.1415 * 2.0) * 127) + 127;\n}\n\nportAudio.getDevices(function(err, devices) {\n  console.log(devices);\n});\n\nportAudio.open({\n  channelCount: 1,\n  sampleFormat: portAudio.SampleFormat8Bit,\n  sampleRate: sampleRate\n}, function (err, pa) {\n  // send samples to be played\n  for (var i = 0; i \u003c 5 * sampleRate / tableSize; i++) {\n    pa.write(buffer);\n  }\n\n  // start playing\n  pa.start();\n\n  // stop playing 1 second later\n  setTimeout(function () {\n    pa.stop();\n  }, 1 * 1000);\n});\n```\n\n## Troubleshooting\n\n### error: 'PaStreamCallbackFlags' has not been declared\n\nTry installing \"libasound-dev\" package. See (http://portaudio.com/docs/v19-doxydocs/compile_linux.html). Then try rebuilding.\n\nIf that doesn't fix it try building and installing portaudio from source (http://www.portaudio.com/download.html). I've compiled\nnode-portaudio with pa_stable_v19_20111121.tgz and was successful on Ubunutu.\n\n### No Default Device Found\n\nEnsure that when you compile portaudio that the configure scripts says \"ALSA\" yes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fnode-portaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeferner%2Fnode-portaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fnode-portaudio/lists"}