Advertisement
TexKiller

main.cpp

Feb 22nd, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1.  
  2. #include <SFML/Graphics.hpp>
  3. #include <SFML/Audio.hpp>
  4.  
  5. int main() {
  6.     sf::RenderWindow window(sf::VideoMode(0,0),"",sf::Style::Default);
  7.     window.SetFramerateLimit(10);
  8.     sf::Playlist testList;
  9.     testList.AddItem("testSound.ogg", sf::Seconds(1), sf::Seconds(3.5), 0, 2);
  10.     testList.AddItem("testSound.ogg", sf::Seconds(9), sf::Seconds(10.5));
  11.     testList.AddItem("testSound.ogg", sf::Seconds(13));
  12.     testList.AddItem("testSound.ogg");
  13.     testList.Play();
  14.     while (window.IsOpen()) {
  15.         sf::Event event;
  16.         while (window.PollEvent(event)) {
  17.             if (event.Type == sf::Event::Closed) {
  18.                 window.Close();
  19.             }
  20.         }
  21.         window.Display();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement