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

Pages: [1] 2
1
General / SFML 2 cannot work
« on: March 23, 2010, 03:39:37 am »
Okay thanks,  I'll go try again some other time. Right now 1.6 seemed to have solved the draw string issue with graphics, and it meets all my requirements (realized only yesterday).

Thank you once again. :)

2
General / SFML 2 cannot work
« on: March 22, 2010, 10:55:30 am »
"No it doesn't, you certainly did something wrong" <-- With due respect, I don't think it's fair to say that :)

Why?
1) I did everything according to your documentation/tutorial/etc.
2) I've been using SFML for months already
3) It worked on 1.5, 1.6, trunk, but not 2.0.
4) I switch from 1.6 -> 2.0 -> trunk -> 1.6 -> 2.0 -> trunk -> 1.6


I'm very sure i did the steps correctly coz I spent a day or 2 solely testing out the various version, using the correct steps, and verifying my every step. I even typed out my steps to allow myself and others in the forum to pin point if i did any thing wrong.

Conclusion
1) It's either you need to do something DIFFERENT because 2.0 is NEW and requires NEW configuration
 
OR

2) Something is wrong with the dll or some where was broken.

If I'm wrong, please at least tell me where.

3
General / SFML 2 cannot work
« on: March 22, 2010, 08:14:58 am »
Anyway some updates if these helps:
1) The one in the svn trunk WORKS (though didn't try the string)
I reverted back last Friday.
2) SFML 1.6 works great, just reverted to 1.6. Now my problem with draw string is solved (at least now I don't see any crashes when I close my program and string is drawn even with default font. So I'll stay on 1.6 for a while.
3) No joy for me using SFML 2. I'm on a Win7 professional and VC9.

I honestly think that SFML 2 got some issues, or maybe it's just on Win7? 'm not too sure about that, but I'm sure the problem isn't with my configuration.

4
General / SFML 2 cannot work
« on: March 22, 2010, 04:05:24 am »
Okay, I gave it another shot.

I deleted the SFML include files (all in a folder).
I deleted all sfml related .lib files.

I updated SVN, compiled all the SFML libs.
Dragged the entire SFML include folder into the include under VC9.
Copied the lib files into the lib under VC9.

My config now is Debug, Win32.

I deleted all my sfml-*-d.dlls in my project folders, and dragged in the new sfml-*-d.dlls into it.

I cleaned soln and re-built my code.
Compilation -> Success
Linking        -> Success
Running of .exe -> Fail.
Error msg:
The procedure entry point ??1SoundBuffer@sf@@QAE@XZ could not be located in the dynamic link library sfml-audio-d.dll.

Okay, I'm stumped. :( What did i do wrong or did not do?

5
General / SFML 2 cannot work
« on: March 19, 2010, 10:21:31 am »
At about GMT+8 4:30PM 19MAR2010 i updated and compiled the SVN branch\sfml2 stuffs with following actions:
- Overwrite the include files
- Compile the vc2008 build
- OVerwrite lib files
- Overwrite my project's -d.dll files
- Overwrite with the new OpenAL and linsnd32 thingy

I can compile and link, but cannot run.
Error from Windows is: Error @AE..SOundBuffer..No entry point in sfml-audio-dll.dll <== something similar.
I re-did the whole process, and still don't work.

I went to the SVN trunk and and used that, and it worked fine. But figured it's an older version since sf::Text reverts back to unknown identifier.

:( I want to draw strings with graphics.

6
Graphics / Graphics string runtime error! R6025 ...
« on: March 19, 2010, 09:00:12 am »
Hi

I've started using SFML's Graphics to draw strings.
But when I added the strings code, my program consistently crashes when I closes it. So I attempted isolation and did a almost-vanilla program to run the draw strings code, and I still get crashes.

Here's the code:
Code: [Select]


#include <SFML/window.hpp>
#include <iostream>
#include <SFML/graphics.hpp>

using namespace std;

int main(void)
{
bool isRunning = true;
sf::String Text;
Text.SetText("Hello");
Text.SetFont(sf::Font::GetDefaultFont());

sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Mozark System 0.1");

while (isRunning)
{
const sf::Input& Input = App.GetInput();

sf::Event Event;
while (App.GetEvent(Event))
{

//-- Process the various events
//Window Closed
if (Event.Type == sf::Event::Closed)
isRunning = false;
}

App.Display();
}
return EXIT_SUCCESS;
}


When I run Visual Studio's debug, and closed my program, I get:
Unhandled exception at 0x02360144 in Mozark.exe: 0xC0000005: Access violation reading location 0xfeeeff0e.
The IDE pointed me to void Image::DestroyTexture()'s
    GLCheck(glDeleteTextures(1, &Texture)); <---

When I run the vanilla code as above, and closed it, I get:
Unhandled exception at 0x0249db10 in Mozark.exe: 0xC0000005: Access violation reading location 0xfeeeffb2.
The IDE pointed me to void WindowImpWin32::SetActive(Bool Active) const's           wglMakeCurrent(NULL, NULL); <----

Library's bug or my coding is bad?
:/
Thanks for the help~ =)

7
Audio / Array of sounds not working
« on: March 08, 2010, 03:11:51 am »
Okay solved.
Nothing wrong with SFML audio.

Just that Buffer.LoadFromFile() was done more than once, thus the OpenAL error, nothing wrong with object array. :)

8
Audio / Array of sounds not working
« on: March 04, 2010, 09:38:15 am »
Code: [Select]

sf::Sound verses[MAX_LOOPS]; // at the constructor

..
..
Sound sound;
sound.SetBuffer(buffer);
verses[getPos(pEntry->d_name)] = sound;


"An internal OpenAL call failed in soundbuffer.cpp (308) : AL_INVALID_VALUE, a numeric argument is out of range"
I get this error message even though it returns TRUE flag.

HOWEVER,
Code: [Select]

Sound sound;
sound.SetBuffer(buffer);

itself works awesome.

I don't get it, why can't it use in arrays?

Any alternative to this code?

I was using Music object and it works fine. But when it comes to Sound instance, it just throws me this mysterious error. :(
Help needed, thank you guys in advance.

9
Audio / [SOLVED] Cannot pass in objects (Music) array
« on: February 08, 2010, 07:03:03 am »
:oops:
this is so embarrassing.
I think I may have found the problem, and it has something to do with project's settings regarding additional dependencies.

10
Audio / [SOLVED] Cannot pass in objects (Music) array
« on: February 08, 2010, 04:38:58 am »
More updates:
Code: [Select]

int main()
{
...
Music rockTracks[MAX_TRACK_NUM];
...
}


This actually throws me the two lnk errors. :/
Why can't I create an array of Music objects? Illegal? :(

I need to use array.

11
Audio / [SOLVED] Cannot pass in objects (Music) array
« on: February 08, 2010, 04:11:19 am »
To add on:
I was trying to work a get-around by
Code: [Select]

void AudioLoader::load()
{
     ...
     Music *rockTracks;
     rockTracks = new Music[MAX_TRACK_NUM];
     ...
}


=> rockTracks = new Music[MAX_TRACK_NUM]; <<== causing linking errors

I get LNK errors:
1>AudioLoader.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Music::~Music(void)" (??1Music@sf@@UAE@XZ) referenced in function "public: void __thiscall AudioLoader::load(void)" (?load@AudioLoader@@QAEXXZ)
1>AudioLoader.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Music::Music(unsigned int)" (??0Music@sf@@QAE@I@Z) referenced in function "public: void __thiscall sf::Music::`default constructor closure'(void)" (??_FMusic@sf@@QAEXXZ)

I don't want to make my audioloader in the main. :(

12
Audio / [SOLVED] Cannot pass in objects (Music) array
« on: February 08, 2010, 02:55:57 am »
Hi
I'm not sure if it's a semantics error of my side or the SFML code as I can't seem to pass-in objects array into my function.

I tried changing the type from 'Music' to a primitive type: 'int' and it works. But when I use Music as the type, I cannot link.

error LNK2001: unresolved external symbol "public: virtual __thiscall sf::Music::~Music(void)" (??1Music@sf@@UAE@XZ)

error LNK2001: unresolved external symbol "public: __thiscall sf::Music::Music(unsigned int)" (??0Music@sf@@QAE@I@Z)

Here's the main:
Code: [Select]

#include "AudioLoader.h"

using namespace std;

int main()
{
cout << "Welcome to Mozark!\n";

AudioLoader rockAL; // AudioLoader object
Music rockTracks[MAX_TRACK_NUM];
rockAL.load(rockTracks); // Load all audio library files

//***FOR DEBUG
cout << "Press enter to exit...";
cin.get();

return EXIT_SUCCESS;
}


Here's the AudioLoader.h:
Code: [Select]

#ifndef AUDIOLOADER_H
#define AUDIOLOADER_H

#define MAX_TRACK_NUM 21
#define FILE_TYPE "*.ogg"

#include <iostream>
#include <string>
#include <windows.h>
#include <dirent.h>
#include <SFML\audio.hpp>

using sf::Music;

class AudioLoader
{
public:
AudioLoader(void);
void load(Music theTracks[]);
int getNum(void);
std::string getTrackName(int);
private:
int numOfTracks;
int trackPtr;
std::string tracks[MAX_TRACK_NUM];
};
#endif


Here's the AudioLoader class file:
Code: [Select]

#include "AudioLoader.h"

using namespace std;

AudioLoader::AudioLoader(void)
{
numOfTracks = 0;
trackPtr = 0;
}

void AudioLoader::load(Music theTracks[])
{
bool loaded = false;

// Setting tracks location
string tempTrack = "";
DIR *pdir = NULL;
pdir = opendir("ogg"); //folder called "OGG"
struct dirent *pEntry = NULL;

// Check for failure
if (pdir == NULL)
{
cout << "Error! Unable to find audio directory.\n";
exit(3);
}

// Begin loading of audio files
cout << "Begin loading of audio tracks...\n";
cout << "--------------------------------\n";

while (pEntry = readdir(pdir))
{
if (numOfTracks >= MAX_TRACK_NUM)
{
cout << "MAXIMUM LOADING OF TRACKS REACHED.\n";
cout << "Warning! Not all audio tracks are loaded.\n";
break;
}
else if (strlen(pEntry->d_name) <= 4)
continue;

else if (pEntry == NULL) // Pointing to nothing
{
cout << "Error! Unable to find any audio files.\n";
exit(3);
}

tracks[numOfTracks] = pEntry->d_name;
cout << "Loaded: " << pEntry->d_name << endl;
numOfTracks++;
}
//Summary of Audio Loading
cout << "----------------------------------\n";
cout << numOfTracks << " tracks have been successfully loaded!\n";
}

..

..



My code error or SFML bug?

Jeremy

13
Audio / Looping crashes at the 3rd time
« on: February 02, 2010, 09:28:22 am »
Okay it's confirmed to be working awesome now :D
Thanks once again~

[SOLVED]

14
Audio / Looping crashes at the 3rd time
« on: February 02, 2010, 09:07:09 am »
Woohoo, thanks man!

:?: Btw, I get it from 1.6 or 2?

15
Audio / Looping crashes at the 3rd time
« on: February 02, 2010, 03:47:10 am »
Hi Laurent,

I tried using LoadFromFile Soundbuffer into Sounds to play,
the loop seems to work well.


I'm just wondering if the nature of my project allows using sounds without overloading the memory.
I'm making a music looper engine with short audio clips such as those uploaded the previous post, and should go up to say 20-30 sounds clips?
How many tracks can SFML play simultaneously?

Pages: [1] 2