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

Pages: [1] 2
1
Audio / Re: FFT on audio samples
« on: May 28, 2012, 08:24:41 pm »
Thanks for the reply. I'm trying to come up with a method to convert data into FFTW's format.

2
Graphics / Buffer overrun
« on: May 28, 2012, 08:20:07 pm »
Hi, I was trying to compile the code provided with the SFML tutorials and I get a buffer overrun error during the compilation.

following is the output :

Quote
'GraphicTest.exe': Loaded 'C:\Users\admin\Documents\Visual Studio 2008\Projects\GraphicTest\Debug\GraphicTest.exe', Symbols loaded.
'GraphicTest.exe': Loaded 'C:\Windows\System32\ntdll.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\kernel32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\KernelBase.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\opengl32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\msvcrt.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\advapi32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\sechost.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\rpcrt4.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\gdi32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\user32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\lpk.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\usp10.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\glu32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\ddraw.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\dciman32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\setupapi.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\cfgmgr32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\oleaut32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\ole32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\devobj.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\dwmapi.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\winmm.dll'
'GraphicTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcp90d.dll', Symbols loaded.
'GraphicTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll', Symbols loaded.
'GraphicTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\msvcr90.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\imm32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\msctf.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\uxtheme.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\prl_gldd.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\version.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\cryptbase.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\dinput.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\hid.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\wintrust.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\crypt32.dll'
'GraphicTest.exe': Loaded 'C:\Windows\System32\msasn1.dll'
First-chance exception at 0x0100a800 in GraphicTest.exe: 0xC0000005: Access violation.
A buffer overrun has occurred in GraphicTest.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.

For more details please see Help topic 'How to debug Buffer Overrun Issues'.
The program '[3236] GraphicTest.exe: Native' has exited with code 0 (0x0).

3
Audio / FFT on audio samples
« on: May 28, 2012, 05:54:00 pm »
Hi, I have loaded samples from a wav file to the memory and received it from SoundBuffer. I want to use FFTW to run FFT on these samples. FFTW takes the input as fftw_complex objects. What type of conversion do I have to do on the sample array to pass it to the FFTW ?

Thanks.

4
Audio / Cannot load a wav file
« on: February 17, 2012, 07:12:48 pm »
Thanks. that solved the problem.

5
Audio / Cannot load a wav file
« on: February 17, 2012, 04:59:30 pm »
I have been trying to run the cpp file provided with the tutorial (http://www.sfml-dev.org/tutorials/1.6/audio-sound.php) and I keep getting an error message in the console "Failed to load sound buffer from file "sound.wav".

I use visual studio 2008. I have copied all dll from extdll and the sfml-audio.dll to the release folder. a wav file with the name "sound.wav" is also copied to the same folder.

following is what I got in the output section of the IDE.

Code: [Select]
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\SFMLTest.exe', Symbols loaded.
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\sfml-system.dll'
'SFMLTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll'
'SFMLTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\sfml-audio.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\openal32.dll', Binary was not built with debug information.
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\dsound.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\libsndfile-1.dll', Binary was not built with debug information.
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\wdmaud.drv'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\ksuser.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\avrt.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\AudioSes.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msacm32.drv'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msacm32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\midimap.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
The thread 'Win32 Thread' (0xd88) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xbe4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x544) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x193c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x14c0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xb6c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xa34) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xfe0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1578) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1460) has exited with code 1 (0x1).
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll'
The program '[6548] SFMLTest.exe: Native' has exited with code 1 (0x1).


Need your help. Thanks.

6
Audio / Capture a signal through the sound card
« on: February 02, 2012, 11:11:56 am »
Quote from: "Laurent"
Whatever you connect to the microphone input of your sound card, SFML will provide it as audio samples. Then it's up to you to interpret them the way you want, for example running a FFT on it if you want to extract the frequencies.


Thank you for the reply. I did not know about that.

7
Audio / Capture a signal through the sound card
« on: February 01, 2012, 12:21:35 pm »
Quote from: "eXpl0it3r"
What kind of input does your audio card allow that's not an audio signal?  :shock:

If you want to deal with audioinput check out the sf::SoundRecorder class.


My aim is to create a medical instrument that records heart pulses. The device has electrodes to pick up signals and an opamp to amplify. If I connect the output to the sound card, is it possible to get amplitude/frequency information of the input signals? my aim is to produce a graph similar to an ECG report.

8
Audio / Capture a signal through the sound card
« on: February 01, 2012, 08:21:49 am »
Hi, I want to find a mechanism to capture an input signal through the sound card (not an audio signal). The signal is being produced in intervals and my goal is to determine the calculate the pulses per minute ratio and to use it accordingly. Any suggestions/tips would be highly appreciated as I'm new to programming.

9
Network / need help with UDP socket
« on: June 08, 2011, 02:04:42 pm »
Quote from: "Laurent"
Quote
But I have disabled firewalls and done the port forwarding as well. Any idea to get it working with the public addresses?

Nop, nothing more than what you already did, sorry. That should be enough.


oh ok. I'll check those settings again then. Thanks a lot for helping me !

10
Network / need help with UDP socket
« on: June 08, 2011, 01:24:45 pm »
Quote from: "Laurent"
Quote
Code: [Select]
sf::IPAddress Address1("112.134.72.168");

That's what I expected ;)

You're using your public IP, which means that the communication goes through the internet and is probably blocked by your router.

Use either your local network address (192.168.xxx.xxx) or localhost (127.0.0.1).


it works with the local network address!  But I have disabled firewalls and done the port forwarding as well. Any idea to get it working with the public addresses?

11
Network / need help with UDP socket
« on: June 08, 2011, 11:26:13 am »
Quote from: "Laurent"
Could you slightly modify this code, and use a fixed IP address instead of one that is entered by user? It's easier to debug/test for us, and see if you're using a bad address for example ;)

Quote
The receiving program did not produce any response

Not even an error?


No error messages. Once I have been using the same port for torrent before I started testing this program, and then the program was receiving different messages from different addresses. So, it seems that the problem is in sending part ?

Code: [Select]
#include <SFML/Network.hpp>
#include <iostream>
#include <string>
using namespace std;

void sendMsg ()
{
char msg[] = "Testing message only.";

sf::IPAddress Address1("112.134.72.168");
sf::SocketUDP Socket;

if (Socket.Send(msg, sizeof(msg), Address1, 4568) != sf::Socket::Done)
{
  cout << "Error sending...\n";
}
}

void getMsg ()
{
sf::SocketUDP Socket;

if (!Socket.Bind(4568))
{
   cout << "Error binding...\n";
}

char Buffer[128];
std::size_t Received;
sf::IPAddress Sender;
unsigned short Port;
if (Socket.Receive(Buffer, sizeof(Buffer), Received, Sender, Port) != sf::Socket::Done)
{
cout << "Error receiving message...\n";
}

cout << Sender << ":" << Port <<endl;

cout << Buffer <<endl;
}

void main ()
{
char ch;
cout << "Send message (S), Get message (G) : ";
cin >> ch;

if (ch == 'S' || ch == 's')
{
sendMsg();
}
else if (ch == 'G' || ch == 'g')
{
getMsg();
}
system ("PAUSE");
}

12
Network / need help with UDP socket
« on: June 07, 2011, 11:22:20 pm »
Quote from: "Laurent"
Yes it is possible.

If you want us to find out what's wrong in your code, show it ;)


Thanks for helping :)

Code: [Select]
#include <SFML/Network.hpp>
#include <iostream>
#include <string>
using namespace std;

void sendMsg ()
{
string ip = " ";
char msg[] = "Testing message only.";

cout << "Enter the IP address to send the message : ";
cin >> ip;

sf::IPAddress Address1(ip);
sf::SocketUDP Socket;

if (Socket.Send(msg, sizeof(msg), ip, 4567) != sf::Socket::Done)
{
  cout << "Error sending...\n";
}

}

void getMsg ()
{
sf::SocketUDP Socket;

if (!Socket.Bind(4567))
{
   cout << "Error binding...\n";
}

char Buffer[128];
std::size_t Received;
sf::IPAddress Sender;
unsigned short Port;
if (Socket.Receive(Buffer, sizeof(Buffer), Received, Sender, Port) != sf::Socket::Done)
{
cout << "Error receiving message...\n";
}

cout << Sender << ":" << Port <<endl;

cout << Buffer <<endl;
}

void main ()

{
char ch;
cout << "Send message (S), Get message (G) : ";
cin >> ch;

if (ch == 'S' || ch == 's')
{
sendMsg();
}
else if (ch == 'G' || ch == 'g')
{
getMsg();
}
system ("PAUSE");
}



I was using 2 instances of this program (one for sending and the other one for listening). The receiving program did not produce any response indicating that it has captured anything.

13
Network / need help with UDP socket
« on: June 07, 2011, 10:44:15 pm »
Hi, I have never done any programming related to socket and network in c++. I have been learning to program using sfml and I was trying created a small program to see if its perfectly working on my pc. The program sends some small text message and I have set the destination address as my own IP address to test it. But havent got any good results. Is it possible to do such a thing, to capture a UDP packet from the same pc ?

14
Network / need help with an error message
« on: May 25, 2011, 10:14:48 pm »
Quote from: "Laurent"
You don't see the console because you created a GUI application (which is the reason why you need a WinMain entry point instead of a main).

You must change your project to be a console application.


Thanks! everything is working now! thanks again

15
Network / need help with an error message
« on: May 25, 2011, 10:04:49 pm »
Quote from: "Laurent"
You must link to sfml-main.


Thanks, I got it working. But again another problem, I do not see the console window. but the compilation and everything seems to be going on. sorry to bother you again and again.

Pages: [1] 2
anything