File indexing completed on 2024-04-21 04:02:09

0001 /*******************************************************************************
0002  *   KBlocks, a falling blocks game by KDE                                     *
0003  *   SPDX-FileCopyrightText: 2009-2021 Julian Helfferich <julian.helfferich@mailbox.org> *
0004  *                                                                             *
0005  *   SPDX-License-Identifier: GPL-2.0-or-later
0006  ******************************************************************************/
0007 #ifndef SOUNDINTERFACE_H
0008 #define SOUNDINTERFACE_H
0009 
0010 enum class Sound {
0011     BlockFall,
0012     BlockMove,
0013     BlockRemove
0014 };
0015 
0016 class KGameTheme;
0017 
0018 class SoundInterface
0019 {
0020 public:
0021     SoundInterface() = default;
0022     virtual ~SoundInterface() = default;
0023 
0024 public:
0025     virtual bool loadTheme(const KGameTheme *) = 0;
0026     virtual void setSoundsEnabled(bool) = 0;
0027     virtual void playSound(Sound) = 0;
0028 };
0029 
0030 #endif // SOUNDINTERFACE_H