AudioPcmOutThreadImplementation.playWav

Requires arsd.wav. Only supports simple 8 or 16 bit wav files, no extensible or float formats at this time.

Also requires the resampler to be compiled in at this time, but that may change in the future, I was just lazy.

class AudioPcmOutThreadImplementation
playWav
(
R
)
if (
is(R == string) ||
is(R == immutable(ubyte)[])
)

Return Value

An implementation of SampleController which lets you pause, etc., the file.

Please note that the static type may change in the future. It will always be a subtype of SampleController, but it may be more specialized as I add more features and this will not necessarily match its sister functions, playMp3 and playOgg, though all three will share an ancestor in SampleController. Therefore, if you use auto, there's no guarantee the static type won't change in future versions and I will NOT consider that a breaking change since the base interface will remain compatible.

Bugs

The seek method is not yet implemented.

Meta

History

Added Nov 8, 2020.

Return value changed from void to a sample control object on December 23, 2020.