AudioCommon.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2009 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <memory>
  5. #include <string>
  6. #include <string_view>
  7. #include <vector>
  8. #include "AudioCommon/Enums.h"
  9. #include "AudioCommon/SoundStream.h"
  10. class Mixer;
  11. namespace Core
  12. {
  13. class System;
  14. }
  15. namespace AudioCommon
  16. {
  17. void InitSoundStream(Core::System& system);
  18. void PostInitSoundStream(Core::System& system);
  19. void ShutdownSoundStream(Core::System& system);
  20. std::string GetDefaultSoundBackend();
  21. std::vector<std::string> GetSoundBackends();
  22. DPL2Quality GetDefaultDPL2Quality();
  23. bool SupportsDPL2Decoder(std::string_view backend);
  24. bool SupportsLatencyControl(std::string_view backend);
  25. bool SupportsVolumeChanges(std::string_view backend);
  26. void UpdateSoundStream(Core::System& system);
  27. void SetSoundStreamRunning(Core::System& system, bool running);
  28. void SendAIBuffer(Core::System& system, const short* samples, unsigned int num_samples);
  29. void StartAudioDump(Core::System& system);
  30. void StopAudioDump(Core::System& system);
  31. void IncreaseVolume(Core::System& system, unsigned short offset);
  32. void DecreaseVolume(Core::System& system, unsigned short offset);
  33. void ToggleMuteVolume(Core::System& system);
  34. } // namespace AudioCommon