wav_io 1.0.0 copy "wav_io: ^1.0.0" to clipboard
wav_io: ^1.0.0 copied to clipboard

Wave audio files IO for dart

example/wav_io_example.dart

import 'dart:io';

import 'package:wav_io/wav_io.dart';

void main() {
  var f = File("example/hello_float.wav").openSync();
  var buf = f.readSync(f.lengthSync());
  f.closeSync();
  var wav = WavContent.fromBytes(buf.buffer.asByteData());

  print(wav.numChannels);
  print(wav.numSamples);
  print(wav.sampleRate);
  print(wav.bitsPerSample);
  f = File("example/hello2.wav").openSync(mode: FileMode.writeOnly);
  f.writeFromSync(wav.toBytes().buffer.asInt8List());
  f.flushSync();
  f.closeSync();
}
4
likes
140
pub points
81%
popularity

Publisher

unverified uploader

Wave audio files IO for dart

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on wav_io