{"_id":"@bun-win32/winmm","_rev":"5-38f00a9d7e7701c181e1d2d9b45d911b","name":"@bun-win32/winmm","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/winmm","version":"1.0.0","keywords":["bun","ffi","win32","windows","winmm","bindings","typescript","dll"],"author":{"name":"Stev Peifer","email":"stev@bell.net"},"license":"MIT","_id":"@bun-win32/winmm@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"1c896bed40e5ad9105747d42ee58ff9ed79a801c","tarball":"https://registry.npmjs.org/@bun-win32/winmm/-/winmm-1.0.0.tgz","fileCount":6,"integrity":"sha512-QJadtUFHoOgPfyCc+CiIxGIP6u9NvFdZw57T/mcmZ+jQF5cnh1qe1E9dhwsEX9SFeDl+l9qLK9w2FZDR2Za/oA==","signatures":[{"sig":"MEYCIQCYpzQ6L80tzMC6DYtX7AYyhqDVr/Ufe/HMX4qNydOsMQIhAO7d5DDkgtajWMrV3mpvUZzQAkeTabtieFW2DjFnBHad","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69819},"main":"./index.ts","type":"module","module":"index.ts","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"gitHead":"2b64bef7a2042aebf24b0a409ee4a8f130ffca62","private":false,"scripts":{"example":"bun ./example/winmm.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/winmm"},"_npmVersion":"10.1.0","description":"Zero-dependency, zero-overhead Win32 WINMM bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"20.8.0","dependencies":{"@bun-win32/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/winmm_1.0.0_1775615813137_0.031409049811479184","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/winmm","version":"1.0.1","keywords":["bun","ffi","win32","windows","winmm","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/winmm@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"ee7eb33eaeea1495f6a635cb1c3a8f34a0bea332","tarball":"https://registry.npmjs.org/@bun-win32/winmm/-/winmm-1.0.1.tgz","fileCount":6,"integrity":"sha512-i35Hst5Qg/3Xp1QtH40TBVfbQkjk+lAPK28e/wSYY6iVdeH3FluXs4nid2jvWkr0YUGc5q8flN3vUZyg6qgdJA==","signatures":[{"sig":"MEUCIE018l/VkT37/PnTmFbLh8xUfPLZcdGNkIRtyT63DHhPAiEAth582oJyE4TtTT880kv6/ahEoVXQ5Sza5F0rJgy3oSM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70088},"main":"./index.ts","type":"module","module":"index.ts","shasum":"ee7eb33eaeea1495f6a635cb1c3a8f34a0bea332","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/winmm.ts","example:seq":"bun ./example/seq.ts","example:synth":"bun ./example/synth.ts","example:joystick":"bun ./example/joystick.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-i35Hst5Qg/3Xp1QtH40TBVfbQkjk+lAPK28e/wSYY6iVdeH3FluXs4nid2jvWkr0YUGc5q8flN3vUZyg6qgdJA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/winmm"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WINMM bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/winmm_1.0.1_1775615914839_0.256070497749165","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bun-win32/winmm","version":"1.0.2","keywords":["bun","ffi","win32","windows","winmm","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/winmm@1.0.2","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"2b995217448433db95747c78b0dd304485b4f2fd","tarball":"https://registry.npmjs.org/@bun-win32/winmm/-/winmm-1.0.2.tgz","fileCount":6,"integrity":"sha512-JXH4wuhLFZ+SwqHa/g3T/w3YjRY2MG2F9lk5KDG4trQ6aQIOd9aRJpvYhsgFbqmWU5ZznzCOpcW2JJLy6YJVcg==","signatures":[{"sig":"MEUCICj+B38X/0YLzmTs18i7LLksTbxzZsdKiaC8IcFCCjBxAiEAqued+L7m3VS0wkc4zhtrcWoOw3NeQ25htoGZE7KQ4Rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70019},"main":"./index.ts","type":"module","module":"index.ts","shasum":"2b995217448433db95747c78b0dd304485b4f2fd","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:synth":"bun ./example/synth.ts","example:device-audit":"bun ./example/device-audit.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-JXH4wuhLFZ+SwqHa/g3T/w3YjRY2MG2F9lk5KDG4trQ6aQIOd9aRJpvYhsgFbqmWU5ZznzCOpcW2JJLy6YJVcg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/winmm"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WINMM bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/winmm_1.0.2_1775687631591_0.8894415350003309","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/winmm","version":"2.0.0","keywords":["bun","ffi","win32","windows","winmm","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/winmm@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"bd3f1789df81de72a348cd0e0612cbc57856326d","tarball":"https://registry.npmjs.org/@bun-win32/winmm/-/winmm-2.0.0.tgz","fileCount":6,"integrity":"sha512-RI7Y/TKPagYDomwKeVdnRkdezGap2iIk5up1XbS0u+cpa3w3DfBzSJwM/5cgeLgohJic/wUbMu8jW4unzLtxYQ==","signatures":[{"sig":"MEQCIBz7+Hxtv4eoouni0jidOyg7V/4DLr9dd+/zduazaN5KAiBQM2teBypdx5zClFEn9O3sZOqOJQtRSkz+4/5JlhxAeg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72250},"main":"./index.ts","type":"module","module":"index.ts","shasum":"bd3f1789df81de72a348cd0e0612cbc57856326d","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:synth":"bun ./example/synth.ts","example:device-audit":"bun ./example/device-audit.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-RI7Y/TKPagYDomwKeVdnRkdezGap2iIk5up1XbS0u+cpa3w3DfBzSJwM/5cgeLgohJic/wUbMu8jW4unzLtxYQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/winmm"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WINMM bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/winmm_2.0.0_1782435994672_0.7021032942168126","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 WINMM bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/winmm","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/winmm"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","winmm","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:synth":"bun ./example/synth.ts","example:device-audit":"bun ./example/device-audit.ts"},"_id":"@bun-win32/winmm@2.0.1","_integrity":"sha512-tT3LHmFe7TIkktxoNJ6ZzmSRrBBdERQSnLZdLw3vg7S+fM0/KN4ZIh8+qvOA89yD2sZiUV0VmrHRgYa57q0/tg==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"0bfd2d9a6f061b0f2d5330400d4f21ad11955e67","dist":{"integrity":"sha512-tT3LHmFe7TIkktxoNJ6ZzmSRrBBdERQSnLZdLw3vg7S+fM0/KN4ZIh8+qvOA89yD2sZiUV0VmrHRgYa57q0/tg==","shasum":"0bfd2d9a6f061b0f2d5330400d4f21ad11955e67","tarball":"https://registry.npmjs.org/@bun-win32/winmm/-/winmm-2.0.1.tgz","fileCount":6,"unpackedSize":72250,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDcrH54iJZaYeUkZAeKLuoB5wNyi4I9Ibjt/woi+xhy0AIgYWV0wDYNf42fb+qX8b8pu6i7x1WTOo6Zs1xb8sfBM0U="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/winmm_2.0.1_1782438220044_0.2848383824386327"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T02:36:52.963Z","modified":"2026-06-26T01:43:40.307Z","1.0.0":"2026-04-08T02:36:53.288Z","1.0.1":"2026-04-08T02:38:34.979Z","1.0.2":"2026-04-08T22:33:51.761Z","2.0.0":"2026-06-26T01:06:34.820Z","2.0.1":"2026-06-26T01:43:40.181Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","winmm","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/winmm"},"description":"Zero-dependency, zero-overhead Win32 WINMM bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/winmm\n\nZero-dependency, zero-overhead Win32 WinMM bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/winmm` exposes the `winmm.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Winmm`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `winmm.dll` (multimedia audio, MIDI, mixers, timers, joysticks, and MCI).\n- In-source docs in `structs/Winmm.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`Winmm.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases and a few common flag enums (see `types/Winmm.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n\n## Installation\n\n```sh\nbun add @bun-win32/winmm\n```\n\n## Quick Start\n\n```ts\nimport Winmm from '@bun-win32/winmm';\n\nconst tickCount = Winmm.timeGetTime();\nconst waveOutDeviceCount = Winmm.waveOutGetNumDevs();\n\nconsole.log({ tickCount, waveOutDeviceCount });\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example/winmm.ts\nbun run example/synth.ts\nbun run example/seq.ts\nbun run example/joystick.ts --duration-ms=10000\n# or continuous polling\nbun run example/joystick.ts --live\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Winmm.Preload()`.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}