mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 19:44:57 +00:00
* Custom Trophy images * text and button - settings * Description * + * plural * translation for 'Trophy earned!' * Revert: translation for 'Trophy earned!' * play audio * fixes crash due to having too many trophies The game 'My Name is Mayo' has so many trophies in sequence that when overlapping them, the emulator ended up crashing, so if there is something on the screen and a new trophies are achieved, it will clear and show the new one. * Animations, config: position, duration * - * TR * fix sdl/qt * clang \O/ * Side menu with filter options. Sorting * +TR * fix showHiddenCheck * Time Unlocked * Fixes ghost text, larger image, black text in light theme * Button - Delete Trophy * limits the width of Description - showMaximized * changing column positions * useEuropeanDateFormat en_US, zh_CN, zh_TW, ja_JP, ko_KR, lt_LT, nb_NO, nl_NL useEuropeanDateFormat = false
30 lines
670 B
C++
30 lines
670 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QAudioOutput>
|
|
#include <QMediaPlayer>
|
|
#include <QObject>
|
|
|
|
class BackgroundMusicPlayer : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static BackgroundMusicPlayer& getInstance() {
|
|
static BackgroundMusicPlayer instance;
|
|
return instance;
|
|
}
|
|
|
|
void setVolume(int volume);
|
|
void playMusic(const QString& snd0path, bool loops = true);
|
|
void stopMusic();
|
|
|
|
private:
|
|
BackgroundMusicPlayer(QObject* parent = nullptr);
|
|
|
|
QMediaPlayer* m_mediaPlayer;
|
|
QAudioOutput* m_audioOutput;
|
|
QUrl m_currentMusic;
|
|
};
|