After construction, the parameters are set and you can set them. After that, you process the samples range-style.
It ignores chunks in the file that aren't the basic standard. It throws exceptions if it isn't a bare-basic PCM wav file.
See wavReader for the convenience constructors.
Note that if you are reading a 16 bit file (bitsPerSample == 16), you'll actually need to cast(short[]) front.
auto reader = wavReader(data[]); foreach(chunk; reader) play(chunk);
See Implementation
After construction, the parameters are set and you can set them. After that, you process the samples range-style.
It ignores chunks in the file that aren't the basic standard. It throws exceptions if it isn't a bare-basic PCM wav file.
See wavReader for the convenience constructors.
Note that if you are reading a 16 bit file (bitsPerSample == 16), you'll actually need to cast(short[]) front.