tahamajs's picture
download
raw
619 Bytes
#pragma once
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <fstream>
#include "Const.hpp"
#include <SFML/Audio.hpp>
#include <SFML/Audio/SoundBuffer.hpp>
class MusicPlayer {
public:
MusicPlayer();
MusicPlayer(string _filePath, float volume = 100, float pitch= 1);
void setVolume(float volume);
void setPitch(float pitch);
void setLoop(bool loop);
void play();
void pause();
void stop();
bool isPlaying() const;
void loadSound();
private:
sf::Sound *m_sound;
sf::SoundBuffer *m_buffer;
bool m_loop;
string filePath;
};

Xet Storage Details

Size:
619 Bytes
·
Xet hash:
0c1951586bc6f801c8d0de8c4dbee5a10a6ad8638bb670153984a418ecc0067f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.