AudioPcmOutThreadImplementation.playOgg

Requires vorbis.d to be compiled in (module arsd.vorbis)

  1. SampleController playOgg(string filename, bool loop)
  2. SampleController playOgg(immutable(ubyte)[] data, bool loop)
    class AudioPcmOutThreadImplementation
    playOgg
    ()
    (
    immutable(ubyte)[] data
    ,
    bool loop = false
    )

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 playWav, 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.

Meta

History

Automatic resampling support added Nov 7, 2020.

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