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 - Spellbreaker

Pages: [1] 2 3
1
Audio / Synchronized playing of multiple ogg files
« on: April 12, 2011, 08:11:31 pm »
Hey there!

For a couple of time, I am trying to write a small program that does nothing than playing three .ogg files 100 % synchronized. Since it seems it is not possible, I wonder if I can use a multichannel ogg ( three active channels ), and change the volume of the channels to fade between the actual songs?

I want to use this to make it possible to fade in / out additional instrument tracks.

I tried the following simple code :
Code: [Select]
   music1.OpenFromFile("mansion-present-hihat.ogg");
     music2.OpenFromFile("mansion-present-hihat.ogg");
     music3.OpenFromFile("mansion-present-hihat.ogg");
     music1.Play();
     music2.Play();
     music3.Play();


I also tried to add the folowing :
Code: [Select]

     music1.SetPlayingOffset(0);
     music2.SetPlayingOffset(music1.GetPlayingOffset());
     music3.SetPlayingOffset(music2.GetPlayingOffset());


Any Ideas?

Sincerly,

Spellbreaker.
[/code]

2
Network / response.GetField("Content-Length") returns 0
« on: November 20, 2010, 03:25:46 pm »
:D Damn sorry, I got WME and SFML mixed up. But thanks anyway ;) ;)

The problem with the external DLL call resides in WME, I asked the wrong guy here ;)

3
Network / response.GetField("Content-Length") returns 0
« on: November 20, 2010, 02:49:46 pm »
Yeah I know, but can I load the page once and store it in a struct inside of the DLL? I thought the information gets lost after the external function call returns to WME...

4
Network / response.GetField("Content-Length") returns 0
« on: November 20, 2010, 02:41:55 pm »
Ah okay. So the solution would be :

If Status is okay, but lenght = 0, then request the whole page and return the string length, right?

5
Network / response.GetField("Content-Length") returns 0
« on: November 20, 2010, 02:28:23 pm »
Code: [Select]

long DLL_EXPORT getURLContentLength(const char * host, const char * page) {
    sf::Http http;
    http.SetHost(host);
    sf::Http::Request request(page);
    sf::Http::Response response = http.SendRequest(request);
    sf::Http::Response::Status status = response.GetStatus();
    std::string str;
    if (status == sf::Http::Response::Ok) {
        str = response.GetField("Content-Length");
    } else {
        str = "Request Error.";
    }
   std::cout << str;
}


This is the Function, the call is :

getURLContentLenght("http://www.sfml-dev.org", "features.php");

If I request the Pages Content, it works correctly, but I simply don't get the content-length.

I want do modify that function to only request the header, then getting the Content-Lenght: Field.

Right now I have to request the whole page once, then get the contentlength by str.length() in C++, and then I have to request the Content again ( with a getURLContent function ).

6
Network / response.GetField("Content-Length") returns 0
« on: November 20, 2010, 12:21:57 pm »
Latest SFML2 SVN Version (1684)

7
Network / response.GetField("Content-Length") returns 0
« on: November 19, 2010, 03:31:47 pm »
Hello!

I have a question, I have the following code :

Code: [Select]

    sf::Http http;
    http.SetHost(host);
    sf::Http::Request request(page);
    sf::Http::Response response = http.SendRequest(request);
    sf::Http::Response::Status status = response.GetStatus();
    std::string str;
    if (status == sf::Http::Response::Ok) {
        str = response.GetField("Content-Length");
    } else {
        str = "Request Error.";
    }
    return str.length();


Why does str always contains 0 ?

Sincerly,

Spellbreaker

8
General / SFML2 Library Filenames
« on: November 11, 2010, 09:20:03 am »
Ah okay, thanks :)

Maybe you should introduce a "News" Category into your Forum :)

Sincerly,

Spellbreaker

9
General / How to share SFML games 'correctly' (DLLs issue)?
« on: November 11, 2010, 08:53:59 am »
Why use DLLs anyway? Simply link to the static libraries, and done.

EDIT:

And I don't think you have to care about some 5-10 Megs of DLL Files these days....where people usually have 500000 Megs of Diskspace ;)

10
General / SFML2 Library Filenames
« on: November 11, 2010, 08:43:54 am »
Hi there.

I just updated my SFML2 Version by SVN, and wondered why the Libraries are called "libsfml-xxx-s.a" instead of "libsfml2-xxx-s.a" again? Just an error, or another Change?

Sincerly,

Spellbreaker

11
General / Thread Priority
« on: October 05, 2010, 11:21:16 am »
I'm using boost.thread myself for advanced stuff, it really doesn't matter in compile-time. You can believe me :)

12
Audio / alGenSources fails after creating a bunch of sf::Sounds
« on: October 05, 2010, 11:15:09 am »
PLease don't dig up 1 year old threads for such questions. Use PM or start a new thread.

13
Graphics / separate process (not thread) dedicated to display?
« on: October 01, 2010, 09:22:18 am »
I don't know if I get your Idea correctly, but everything you mentioned is possible by using threads.

Using Exception handling and other stuff you can nearly catch every crash/freeze/hang whatever, so it wouldn't be a problem to display some kind of dialogue afterwards.

I also don't think how smart windows is, if processes directly share memory or pass data, I'd also guess some anti-vir-guards will make an alert if you try to read memory that has been written by another process ( if that is even possible, what I don't know ).

I wouldn't put too much effort into that Idea. It is so much work, just to handle an event that should never happen :)

Greets,

Spellbreaker

14
General / Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« on: September 30, 2010, 12:39:32 pm »
First, you should compile static sfml libs yourself with the compiler you will use for compiling your app.

Second try adding -static-libstdc++ to the linker options.


Greets

15
Feature requests / SetCursor in sf::Window
« on: September 30, 2010, 12:25:28 pm »
I'd vote for it, it would be very helpful and is a standard-feature for such libs in my opinion.

Pages: [1] 2 3
anything