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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - er4zox

Pages: [1]
1
Audio / Need help with audio spatialization
« on: February 17, 2015, 01:35:38 pm »
Hey guys, why does the sound play from the right speaker only when the listener is "above" the sound.
The listener has the same X/Y pos as the sound.

Thanks for the help guys!

Code:
(click to show/hide)

2
Audio / Re: Lack with Music and spatialization
« on: February 16, 2015, 12:24:15 am »
Exactly! Thank you so much, I'm sure this will help others too! :)

Greetings
Blackanges

3
Audio / Re: Lack with Music and spatialization
« on: February 15, 2015, 09:41:57 pm »
Damn, the link isn't working anymore. Does somebody have a working link to that article?
Because I'm stuggeling with 3D sound too and I'm sure that blog could help me.

Greetings
er4zox

4
Audio / Re: Doesn't play a Mono.wav
« on: February 05, 2015, 08:55:44 pm »
No error in the console. I tried another converter (Audacity) and now it works.
But its weird that it wasn't played, because every player I tried (iTunes,Vlc,WinPlayer) played the file.

Thanks for your reply :)

5
Audio / [SOLVED] Doesn't play a Mono.wav
« on: February 05, 2015, 06:14:40 pm »
Hey guys, I wanted to experiment with spatialized sounds but I'm already stuck on playing a normal Mono file.

I know that spatialized sounds have to be mono, but it doesn't even play the mono sound. However, it  does play the sound rendered in stereo. I really dont know why this happens.

Is there anything special I have to care for while rendering a mono file so SFML can use it?

The 2 sounds (Mono/Sterero) are attached.

Thanks for your help!

Greetings
Er4zoX

#include <SFML/System.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(500, 500), "SFML works!");

        sf::SoundBuffer sb_Sound;
        sf::Sound snd_Sound;

        sb_Sound.loadFromFile("SFMLSoundTestMono.wav"); // Sound in Mono
        //sb_Sound.loadFromFile("SFMLSoundTest.wav");   // Sound in Stereo
        snd_Sound.setBuffer(sb_Sound);

        sf::RectangleShape shape;
        shape.setSize(sf::Vector2f(50.0f,50.0f));
        shape.setPosition(200,200);

        snd_Sound.setLoop(true);
        snd_Sound.play();

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();        
        }
        window.clear();
                window.draw(shape);
        window.display();
    }
    return 0;
}
 

6
General / Re: RectangleShape in a vector
« on: July 26, 2013, 08:44:04 pm »
Ah thank you!
Finally it works ;D

Greetings
Er4zoX

7
General / RectangleShape in a vector
« on: July 26, 2013, 07:56:32 pm »
Hello guys !

I have a vector inside a class:
std::vector<sf::RectangleShape*> pShapes;
sf::RectangleShape * p;

If I add something to the vector I do
p = new sf::RectangleShape;
pShapes.push_back(p);

Now the problem:
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const
        {
                for (int i = 0; i < pShapes.size(); ++i)
        {
                                target.draw(pShapes[i],states);
                }
        }

It gives me this error:


I searched for this problem but didn't find anything.

Thanks for your help!

Greetings
Er4zoX

Pages: [1]