-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
526 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef PC_AUDIO_NAME_H | ||
#define PC_AUDIO_NAME_H | ||
|
||
enum SoundID | ||
{ | ||
BALL_HIT_BRICK, | ||
BALL_HIT_WALL, | ||
POWER_UP_PICKED, | ||
BALL_LOST, | ||
|
||
COUNT_SOUNDS | ||
}; | ||
|
||
enum MusicID | ||
{ | ||
MUSIC_MENU, | ||
MUSIC_GAME, | ||
MUSIC_WIN, | ||
MUSIC_LOSE | ||
}; | ||
|
||
#endif // !PC_AUDIO_NAME_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "AudioService.h" | ||
|
||
|
||
|
||
AudioService::AudioService() | ||
{ | ||
} | ||
|
||
|
||
AudioService::~AudioService() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef AUDIO_SERVICE_H | ||
#define AUDIO_SERVICE_H | ||
|
||
#include "AudioPCName.h" | ||
|
||
#include <SFML/Audio.hpp> | ||
/// <summary> | ||
/// An interface for all AudioServices (in case you are on PC, PS4, Xbox, etc...) | ||
/// </summary> | ||
class AudioService | ||
{ | ||
public: | ||
AudioService(); | ||
virtual ~AudioService(); | ||
virtual sf::SoundBuffer* getSound(SoundID soundID) = 0; | ||
|
||
virtual void setVolume(MusicID soundID, float volume) = 0; | ||
virtual void playMusic(MusicID soundID) = 0; | ||
virtual void stopMusic(MusicID soundID) = 0; | ||
virtual void setLooping(MusicID soundID, bool looping) = 0; | ||
}; | ||
|
||
|
||
#endif // AUDIO_SERVICE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.