Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: can't find dll *solved*  (Read 2667 times)

0 Members and 1 Guest are viewing this topic.

werner291

  • Newbie
  • *
  • Posts: 2
    • View Profile
can't find dll *solved*
« on: April 22, 2011, 02:09:00 pm »
I have this code from the sound tutorial:
Code: [Select]

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio.hpp>
#include <iomanip>
#include <iostream>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Load a sound buffer from a wav file
    sf::SoundBuffer Buffer;
    if (!Buffer.LoadFromFile("sound.wav"))
        return EXIT_FAILURE;

    // Display sound informations
    std::cout << "sound.wav :" << std::endl;
    std::cout << " " << Buffer.GetDuration()      << " sec"           << std::endl;
    std::cout << " " << Buffer.GetSampleRate()    << " samples / sec" << std::endl;
    std::cout << " " << Buffer.GetChannelsCount() << " channels"      << std::endl;

    // Create a sound instance and play it
    sf::Sound Sound(Buffer);
    Sound.Play();

    // Loop while the sound is playing
    while (Sound.GetStatus() == sf::Sound::Playing)
    {
        // Display the playing position
        std::cout << "\rPlaying... " << std::fixed << std::setprecision(2) << Sound.GetPlayingOffset() << " sec";

        // Leave some CPU time for other threads
        sf::Sleep(0.1f);
    }
    std::cout << std::endl;

    // Wait until the user presses 'enter' key
    std::cout << "Press enter to exit..." << std::endl;
    std::cin.ignore(10000, '\n');

    return EXIT_SUCCESS;
}


When i try running it, it tells me : can't find libsndfile-1.dll. Next, it crashes.

I can't seem to find it in the sfml sdk. Where can i find it or did i misconfigure Codeblocks?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
can't find dll *solved*
« Reply #1 on: April 22, 2011, 02:14:01 pm »
It's located in extlibs/bin
Laurent Gomila - SFML developer

werner291

  • Newbie
  • *
  • Posts: 2
    • View Profile
can't find dll *solved*
« Reply #2 on: April 22, 2011, 02:18:07 pm »
hmm... didn't think about looking there yet, thanks