2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:09:55 -06:00
|
|
|
// Refer to the license.txt file included.
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2016-07-31 10:35:08 -06:00
|
|
|
#include <memory>
|
2016-12-11 04:11:34 -07:00
|
|
|
#include <string>
|
2019-05-31 05:01:44 -06:00
|
|
|
#include <string_view>
|
2016-12-11 04:11:34 -07:00
|
|
|
#include <vector>
|
2016-07-31 10:35:08 -06:00
|
|
|
|
2019-03-18 05:22:27 -06:00
|
|
|
#include "AudioCommon/Enums.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "AudioCommon/SoundStream.h"
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2017-06-26 15:41:12 -06:00
|
|
|
class Mixer;
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2016-07-31 10:35:08 -06:00
|
|
|
extern std::unique_ptr<SoundStream> g_sound_stream;
|
2009-07-05 20:10:26 -06:00
|
|
|
|
|
|
|
namespace AudioCommon
|
|
|
|
{
|
2016-07-31 10:35:08 -06:00
|
|
|
void InitSoundStream();
|
2021-03-21 17:06:44 -06:00
|
|
|
void PostInitSoundStream();
|
2009-07-05 20:10:26 -06:00
|
|
|
void ShutdownSoundStream();
|
2017-02-04 18:15:38 -07:00
|
|
|
std::string GetDefaultSoundBackend();
|
2009-07-05 20:10:26 -06:00
|
|
|
std::vector<std::string> GetSoundBackends();
|
2019-03-18 05:22:27 -06:00
|
|
|
DPL2Quality GetDefaultDPL2Quality();
|
2019-05-31 05:01:44 -06:00
|
|
|
bool SupportsDPL2Decoder(std::string_view backend);
|
|
|
|
bool SupportsLatencyControl(std::string_view backend);
|
|
|
|
bool SupportsVolumeChanges(std::string_view backend);
|
2013-01-16 18:16:56 -07:00
|
|
|
void UpdateSoundStream();
|
2017-10-21 13:35:58 -06:00
|
|
|
void SetSoundStreamRunning(bool running);
|
2016-07-31 17:14:20 -06:00
|
|
|
void SendAIBuffer(const short* samples, unsigned int num_samples);
|
2014-10-15 18:03:31 -06:00
|
|
|
void StartAudioDump();
|
|
|
|
void StopAudioDump();
|
2014-12-28 14:03:21 -07:00
|
|
|
void IncreaseVolume(unsigned short offset);
|
|
|
|
void DecreaseVolume(unsigned short offset);
|
|
|
|
void ToggleMuteVolume();
|
2019-05-05 17:48:12 -06:00
|
|
|
} // namespace AudioCommon
|