FLUTTER ECOSYSTEM

liamappelbe/wav

WAVファイルの読み取りと書き込み用のDartパッケージ

wav のプロジェクト画像
Stars
20
Forks
7
最終プッシュ(UTC)
2025/07/03
プロジェクト状態
公開中
Liam Appelbe GitHub avatar
GITHUB User

Liam Appelbe ↗

言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 2 件

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

wav

pub package Build Status Coverage Status

Simple tools for reading and writing WAV and raw audio files. Written in pure Dart, with no dependencies.

This package currently supports reading and writing 8/16/24/32 bit PCM, and 32/64 bit float formats. Other formats can be added as needed (just file a bug).

This package also supports WAVE_FORMAT_EXTENSIBLE, but only for reading. Extensible WAVs are essentially treated as ordinary WAV files, because wValidBitsPerSample and dwChannelMask are ignored. Please file a bug if you have a use case for either of these metadata fields, or for writing extensible WAV files.

Usage

// Read a WAV file.
final wav = await Wav.readFile(filename);

// Look at its metadata.
print(wav.format);
print(wav.samplesPerSecond);

// Mess with its audio data.
for (final chan in wav.channels) {
  for (int i = 0; i < chan.length; ++i) {
    chan[i] /= 2;  // Decrease the volume.
  }
}

// Write to another WAV file.
await wav.writeFile(otherFilename);