diff options
Diffstat (limited to 'dom/media/CubebUtils.h')
-rw-r--r-- | dom/media/CubebUtils.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dom/media/CubebUtils.h b/dom/media/CubebUtils.h index f434923747..8449462442 100644 --- a/dom/media/CubebUtils.h +++ b/dom/media/CubebUtils.h @@ -8,6 +8,7 @@ #define CubebUtils_h_ #include "cubeb/cubeb.h" +#include "mozilla/dom/AudioDeviceInfo.h" #include "mozilla/dom/AudioChannelBinding.h" #include "mozilla/Maybe.h" @@ -30,15 +31,22 @@ uint32_t MaxNumberOfChannels(); // Get the sample rate the hardware/mixer runs at. Thread safe. uint32_t PreferredSampleRate(); +enum Side { + Input, + Output +}; + void PrefChanged(const char* aPref, void* aClosure); double GetVolumeScale(); bool GetFirstStream(); cubeb* GetCubebContext(); cubeb* GetCubebContextUnlocked(); uint32_t GetCubebPlaybackLatencyInMilliseconds(); -Maybe<uint32_t> GetCubebMSGLatencyInFrames(); +uint32_t GetCubebMSGLatencyInFrames(cubeb_stream_params * params); bool CubebLatencyPrefSet(); void GetCurrentBackend(nsAString& aBackend); +void GetDeviceCollection(nsTArray<RefPtr<AudioDeviceInfo>>& aDeviceInfos, + Side aSide); } // namespace CubebUtils } // namespace mozilla |