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