{"id":20129303,"url":"https://github.com/kleydon/wavutils","last_synced_at":"2025-07-28T09:32:56.048Z","repository":{"id":103525413,"uuid":"264531900","full_name":"kleydon/WavUtils","owner":"kleydon","description":"Utilities for reading and writing wav files; all at once or incrementally.","archived":false,"fork":false,"pushed_at":"2020-05-24T01:46:07.000Z","size":139,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T16:09:24.224Z","etag":null,"topics":["16-bit","32-bit","64-bit","8-bit","android","audio","convert","floating-point","frame","ios","lpcm","osx","pcm","read","reading","wav","wave","windows","write","writing"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kleydon.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":"2020-05-16T21:36:59.000Z","updated_at":"2024-10-11T03:18:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"749ac093-5fd0-4dfa-8ef5-a29663bda9a3","html_url":"https://github.com/kleydon/WavUtils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kleydon/WavUtils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleydon%2FWavUtils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleydon%2FWavUtils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleydon%2FWavUtils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleydon%2FWavUtils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kleydon","download_url":"https://codeload.github.com/kleydon/WavUtils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleydon%2FWavUtils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267494618,"owners_count":24096818,"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-07-28T02:00:09.689Z","response_time":68,"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":["16-bit","32-bit","64-bit","8-bit","android","audio","convert","floating-point","frame","ios","lpcm","osx","pcm","read","reading","wav","wave","windows","write","writing"],"created_at":"2024-11-13T20:33:22.283Z","updated_at":"2025-07-28T09:32:55.753Z","avatar_url":"https://github.com/kleydon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WavUtils\n\nClasses for reading and writing Wav files in C++.\n- Read or write incrementally (frame by frame), or all at once\n- Support for 8/16/24/32-bit int samples, or 32/64-bit float samples\n- Conversion to/from 16-bit int format, while reading or writing\n- In-Memory conversion to/from 16-bit int format\n- Little-Endian; supports iOS, Android NDK, Windows, and OSX (post-PowerPC)\n\n## Usage\n\n### Read:\n```C++\n#include \"WavReader.hpp\"\n...\nWavReader* wr = new WavReader();\nwr-\u003einitialize(inputWavFilePath);\nwr-\u003eprepareToRead();  // Metadata available after this\nwr-\u003ereadData(sampleData, wr-\u003egetSampleDataSize());\nwr-\u003efinishReading();\n```\n\n### Write:\n\n```C++\n#include \"WavWriter.hpp\"\n...\nWavWriter* ww = new WavWriter();\nww-\u003einitialize(outputWavFilePath,\n               sampleRate,\n               numChannels,  // 1 || 2\n               samplesAreInts, // false for 32/64-bit float vals\n               byteDepth);  // 1, 2, 3, 4 for int samples; 4 or 8 for float samples\nww-\u003estartWriting(); //Writes header\nww-\u003ewriteData(sampleData, sampleDataSize);\nww-\u003efinishReading();\n```\n### Incrementally Read \u0026 Write:\n```C++\n...\nwr-\u003ereadData(bufferA, bufferASize);\nwr-\u003ereadData(bufferB, bufferBSize);\n...\nww-\u003ewriteData(bufferA, bufferASize);\nww-\u003ewriteData(bufferB, bufferBSize);\n...\n```\n### Conversion to/from Int16 Samples, during Read \u0026 Write\n```C++\n...\nwr-\u003ereadDataToInt16s(int16Samples,\n                     numInt16Samples);\n\nww-\u003ewriteDataFromInt16s(int16Samples,\n                        numInt16Samples);\n...\n```\n\n### In-Memory Conversion to/from Int16 Samples\n```C++\n...\nwr-\u003ereadInt16SampleFromArray(sampleData,  // Wav-format \"source\" sample data array\n                             sampleDataSize,\n                             sampleIndex,  //Index of sample to be read\n                             int16SampleCh1,  // Sample's channel-1 value, as int16\n                             int16SampleCh2);  // Sample's channel-2 value (if available), as int16\n...\nww-\u003ewriteInt16SampleToArray(int16SampleCh1,  // Sample's channel-1 value, as int16\n                            int16SampleCh2,  // Sample's channel-2 value (if available), as int16\n                            sampleIndex,  //Index of sample to be written\n                            sampleData,  // Wav-format \"target\" sample data array\n                            sampleDataSize);\n...\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleydon%2Fwavutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkleydon%2Fwavutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleydon%2Fwavutils/lists"}