Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SFML/Graphics.hpp>
- #include <SFML/Audio.hpp>
- int main() {
- sf::RenderWindow window(sf::VideoMode(0,0),"",sf::Style::Default);
- window.SetFramerateLimit(10);
- sf::Playlist testList;
- testList.AddItem("testSound.ogg", sf::Seconds(1), sf::Seconds(3.5), 0, 2);
- testList.AddItem("testSound.ogg", sf::Seconds(9), sf::Seconds(10.5));
- testList.AddItem("testSound.ogg", sf::Seconds(13));
- testList.AddItem("testSound.ogg");
- testList.Play();
- while (window.IsOpen()) {
- sf::Event event;
- while (window.PollEvent(event)) {
- if (event.Type == sf::Event::Closed) {
- window.Close();
- }
- }
- window.Display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement